I have just started college and we are going to be using python. We really have done nothing so I have downloaded the program and done some print commands, and that\'s it.
Just add an line of code in idle "input()"
Depending on what I'm using it for, or if I'm doing something that others will use, I typically just input("Do eighteen backflips to continue")
if it's just for me, if others will be using I just create a batch file and pause it after
cd '/file/path/here'
python yourfile.py
pause
I use the above if there is going to be files renamed, moved, copied, etc. and my cmd needs to be in the particular folder for things to fall where I want them, otherwise - just
python '/path/to/file/yourfile.py'
pause
In Python 3, add the following to the end of your code:
input('Press ENTER to exit')
This will cause the program to wait for user input, with pressing ENTER causing the program to finish.
You can double click on your script.py
file in Windows conveniently this way.