I know I’m missing something simple here:
>>> mystring = "abcdefghijk"
>>> if mystring(len) > 9:
... mySlice = mystring[:8]
I just want to slice “mystring” to 8 characters, why I’m getting this error:
Runtime error : ‘str’ object is not
callable
Thanks!
You have an error in your syntax (you’re trying to call “mystring”).
This should work: