assigning a list in python
Posted
by mekasperasky
on Stack Overflow
See other posts from Stack Overflow
or by mekasperasky
Published on 2010-04-09T09:32:31Z
Indexed on
2010/04/09
10:03 UTC
Read the original article
Hit count: 295
python
pt=[2]
pt[0]=raw_input()
when i do this , and give an input suppose 1011 , it says list indexing error- " list assignment index out of range" . may i know why? i think i am not able to assign a list properly . how to assign an array of 2 elements in python then?
© Stack Overflow or respective owner