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.
When I run my .py file (a print
command) it immediately closes after appearing. I understand why it does this - it's given the output, so it's done what it needs to do - but I also understand that you can stop this from happening.
I looked around this website and none of the solutions given to this question worked, either that or I didn't understand them.
Is there a simple command I can input to my IDLE editor that will put the program on hold or something? I have tried input("prompt: ")
as suggested by someone, and that made no difference.
If there isn't a command for this, is there a way to change the settings on the computer so that programs don't auto close?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…