I know I can slice a string in Python by using array notation: str[1:6], but how do I splice it? i.e., replace str[1:6] with anot
str[1:6]
Python strings are immutable, you need to manually:
new = str[:1] + new + str[6:]