I'm stuck on this exercise because of a seemingly unnecessary error. The program works in the way that it is supposed to, with each character of "spam!" lbeing printed seperately, but every time, I get this error:
Traceback (most recent call last):
File "python", line 10, in
TypeError: string indices must be integers, not tuple
Here is my code:
thing = "spam!" for c in thing: print c word = "eggs!" # Your code here! for character in word: print word[0,5]
Is there something I'm missing? Help would be much appreciated.