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 another string, possibly of a different length?
I know I can slice a string in Python by using array notation: str[1:6]
Share
Nevermind. Thought there might be a built in function. Wrote this instead: