How to change a string
text = "abcd"
print(text) # abcd
text = text[:2] + 'Y' + text[3:]
print(text) # abYd
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
text = "abcd"
print(text) # abcd
text = text[:2] + 'Y' + text[3:]
print(text) # abYd