Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 18, 2022 18:13
Show Gist options
  • Save parzibyte/fc17d76f9d1136a6fc29f9e50f3561cc to your computer and use it in GitHub Desktop.
Save parzibyte/fc17d76f9d1136a6fc29f9e50f3561cc to your computer and use it in GitHub Desktop.
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