Wrong class type

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

https://www.codecademy.com/paths/computer-science/tracks/cspath-cs-101/modules/cspath-code-challenges-ii/articles/python-code-challenges-strings


I wonder why it says the indices have to be integers when I already made sure the values stored in the variables are integers. I already tested with return type(e) and it returned class int

Hello @data5749294937, welcome to the forums!
Are you looking for a list slice? If so, remember you use a colon (:) between the numbers. As you have it currently (with the comma between the numbers), you’re actually passing a tuple (which is like a list, but immutable) as the index, which you can’t do.

Thank you so much! This solves my problem perfectly. Silly me :smiley: While we’re at it, is there a way I can hire a teacher through codecademy for my lessons? Would really fast track my learning :frowning:

1 Like

I don’t think so, no

1 Like