Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getSlice(self,x,y):
- return self.sentence[x,y]
- print(Sentence1.getSlice(0,12))
- Traceback (most recent call last):
- File "C:/Users/michael/Desktop/Python homework/Assgn16/1question.py", line 24, in <module>
- print(Sentence1.getSlice(0,12))
- File "C:/Users/michael/Desktop/Python homework/Assgn16/1question.py", line 8, in getSlice
- return self.sentence[x,y]
- TypeError: string indices must be integers
Add Comment
Please, Sign In to add comment