0
what should i use to get in to next line ? words=["Hello","world","!"] print(words[0]) {then i pushed enter to write next line,but gave me answer , i mean i couldn't follow order that has been given} Hello and how should i write print(words[1]) in next lint without interruption? đ
4 RĂ©ponses
+ 1
Use three print() functions and call every value in the list.
Also, you can use this function to put a blank line on the screen; just call print() with nothing in between the parentheses.
+ 1
so the main structure doesn't work properlyđ
+ 1
There's nothing wrong with your program structure. Its depends of how you want to test the program. The interactive shell is good to run Python instructions one at a time (as soon as you press ENTER). To type an entire program you have to use the file editor.
0
u r writing code in python command line so the print function was executed just right after u press enter.. try to write code in Python IDLE.. it will execute the whole code