[Tutor] List issues
dyoo at hashcollision.org
Thu Apr 17 19:12:03 CEST 2014
Try lists of non-numbers as your input, and the error should be a
little clearer to see. You should see the conceptual error you're
making if not everything in your program is numeric.
words = ['hello', 'world', 'hello']
First write down what you'd expect to see from this. Then execute
this snippet. Does your expectations match what you see?
A main bug in your program is that parts of your program are using
numbers for list indices, and other parts of your program are using
numbers as elements, but there's a little confusion in using one
notion for the other.
More information about the Tutor