Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 26 Online
OpenStudy (anonymous):

Can't get my string to slice! What's wrong with my code? x = find(checkString,key) checkString[x:] Can't get my string to slice! What's wrong with my code? x = find(checkString,key) checkString[x:] @MIT 6.00 Intro Co…

OpenStudy (anonymous):

Strings are immutable in Python. In order to slice like that, you have to create a new sring, i.e. x = find(checkString) checkString = checkString[x:]. The important thing is to realize that you have to create a new copy of the old string because of its immutability.

OpenStudy (anonymous):

Ah of course! That's what the lecturer was talking about while I was zoning out... tks bmp

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!