+ 1
Python change one letter in word?
Hi I want to change live in love. What possibilities do I have?
5 ответов
+ 3
hi,
str = 'live'
print(str)
str = str[:1] + 'o' + str[2:]
print(str)
+ 5
Lmao why so many people type python as phyton!?
There's a str.replace(original,final) method
+ 2
You could split the word into an array, iterate over it and change the letter. Then change it back to a string. There's also the built-in method replace() but I don't know how it does it.
0
Thanks guys,
Jeah the python was
recommended by Android. 😁