-
-
Save parzibyte/fc17d76f9d1136a6fc29f9e50f3561cc to your computer and use it in GitHub Desktop.
This file contains 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 reemplazar_letra(palabra, letra_buscada, letra_reemplazo): | |
resultado = "" | |
for letra in palabra: | |
if letra == letra_buscada: | |
resultado += letra_reemplazo | |
else: | |
resultado += letra | |
return resultado | |
reemplazada = reemplazar_letra( | |
"Programando en Python desde parzibyte.me", "o", "0") | |
print(reemplazada) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment