-
Notifications
You must be signed in to change notification settings - Fork 1
/
mutateString.py
9 lines (7 loc) · 1.21 KB
/
mutateString.py
1
2
3
4
5
6
7
8
9
def mutate_string(string, position, character):
new_string = list(string)
new_string[position] = character
print("".join(new_string))
string = "randomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomnessrandomness"
position, character = 27 , "p"
mutate_string(string, position, character)