TypeError: list indices must be integers, not tuple

Chris Angelico rosuav at gmail.com
Tue Feb 10 09:33:38 EST 2015


On Wed, Feb 11, 2015 at 1:28 AM, Dave Angel <davea at davea.name> wrote:
>> If you can show me a one tuple anywhere in the original code I'll
>> happily buy you a tipple of your choice.
>
>
> print Menu[fav,RandomNum]
>
> was in the original code

That's not a one-tuple (as in, a tuple with one element), it's a
two-element tuple. The point is that ("3") doesn't create a tuple,
it's just superfluous parentheses.

ChrisA



More information about the Python-list mailing list