Last active
July 23, 2019 19:27
-
-
Save romicofre/8b5f1e038f608a586d462c1d2c16cf67 to your computer and use it in GitHub Desktop.
Alternar mayúscula y minúscula en función recursiva. Python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def mmr(texto): | |
| if len(texto) == 0 : | |
| return "" | |
| if len(texto) == 1: | |
| return texto[0].upper() | |
| else: | |
| return texto[0].upper()+texto[1]+mmr(texto[2:]) | |
| mmr("hola") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment