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]
What about such try?
>>> str = 'This is something...' >>> s = 'Theese are' >>> print str This is something... >>> str = str.replace(str[0:7], s) >>> print str Theese are something...