Began to learn Python, downloaded the interpreter, write code in the test.py file
x = 0 while x<=10: print x x += 1
I launch it, the console opened, closed. raw_input()
added, did not help.
Began to learn Python, downloaded the interpreter, write code in the test.py file
x = 0 while x<=10: print x x += 1
I launch it, the console opened, closed. raw_input()
added, did not help.
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
Pyton did not study. Linux made tst.py and chmod + x tst.py
#!/usr/bin/python x = 0 while x<=10: print x x += 1 avp@avp-xub11:~/src/ig/web-agent$ ./tst.py 0 1 2 3 4 5 6 7 8 9 10 avp@avp-xub11:~/src/ig/web-agent$
Works.
IMHO if you run in Windows in the cmd window or powershell, it will also work. And better, @johniek_comp , you throw this Windows.
raw_input(“Press enter to exit”)
Source: https://ru.stackoverflow.com/questions/102625/
All Articles