Mar-28-2018, 03:37 PM
(This post was last modified: Mar-28-2018, 04:02 PM by Marcus_Gondwe.)
Hie, am just a newbie to python. i downloaded pycharm as my IDE and python 3.6 installed. I have a book which I am studying but when I try to practice some of the codes it gives me errors. surprisingly even if i copy the exact code it still gives me errors. Is my IDE ok or may the code isn't correct? for example, when i copy this code (changing lists) into my ide it gives me errors >>> x= [1,1,1] x[3]=2 please help me at [email protected] 
this is the error message
Traceback (most recent call last):
File "<input>", line 1, in <module>
IndexError: list assignment index out of range
Thanks Satish for your answer, I really assigned to a position (3) that doesn't exist. How could I not see it.

(Mar-28-2018, 03:37 PM)Marcus_Gondwe Wrote: Hie, am just a newbie to python. i downloaded pycharm as my IDE and python 3.6 installed. I have a book which I am studying but when I try to practice some of the codes it gives me errors. surprisingly even if i copy the exact code it still gives me errors. Is my IDE ok or may the code isn't correct? for example, when i copy this code (changing lists) into my ide it gives me errors >>> x= [1,1,1] x[3]=2 please help me at [email protected]
this is the error message
Traceback (most recent call last):
File "<input>", line 1, in <module>
IndexError: list assignment index out of range
(Mar-28-2018, 03:37 PM)Marcus_Gondwe Wrote: Hie, am just a newbie to python. i downloaded pycharm as my IDE and python 3.6 installed. I have a book which I am studying but when I try to practice some of the codes it gives me errors. surprisingly even if i copy the exact code it still gives me errors. Is my IDE ok or may the code isn't correct? for example, when i copy this code (changing lists) into my ide it gives me errors >>> x= [1,1,1] x[3]=2 please help me at [email protected]
(Mar-28-2018, 03:37 PM)Marcus_Gondwe Wrote: Hie, am just a newbie to python. i downloaded pycharm as my IDE and python 3.6 installed. I have a book which I am studying but when I try to practice some of the codes it gives me errors. surprisingly even if i copy the exact code it still gives me errors. Is my IDE ok or may the code isn't correct? for example, when i copy this code (changing lists) into my ide it gives me errors >>> x= [1,1,1] x[3]=2 please help me at [email protected]
this is the error message
Traceback (most recent call last):
File "<input>", line 1, in <module>
IndexError: list assignment index out of range
Thanks Satish for your answer, I really assigned to a position (3) that doesn't exist. How could I not see it.
