+ 1
Problem with lists in python
I tried to make list like this: nums=[5,4,3,2,1] print(nums[0]) print(nums[1]) print(nums[3]) But, after first line with print, when i clicked Enter, my 'code' ends there and I cant write other two columns with print? How should I do that? Im begginer, sory for silly question and for my bad english, it isnt my primary language.
3 ответов
+ 1
Use Python IDLE so that u can exuecute multiple lines of code..
0
Yeah, Im using it. I 'solved ' my problem writing:
if num==num:
print..
Can i always do it like that or..?
0
its very weird. what device do you have Python on? are you using your phone or a computer? I just tried your code and it works fine. you can also try :
print(nums[0]," ",nums[1]," ",nums[3])