indices question

Christian Heimes lists at cheimes.de
Fri Sep 5 19:54:10 EDT 2008


Lanny wrote:
> Please don't tell me that "list indices must be integers" because I know 
> that, Why can't I put a varible thats an integer instead? 


raw_input() always returns a string. You have to convert the string into 
an integer using int().

Christian




More information about the Python-list mailing list