Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dcortesnet/504b2b640cc7477803f759246b360dba to your computer and use it in GitHub Desktop.
Save dcortesnet/504b2b640cc7477803f759246b360dba to your computer and use it in GitHub Desktop.
Python mutar un string por una posición y un carácter
def mutate_string(string, position, character):
string_list = list(string)
string_list[position] = character
string = "".join(string_list)
return string
mutate_string("hola", 0, "H")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment