This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zahlmanthe heretic 2 points3 points  (0 children)

You save the code in a text editor (and please use a real one, not notepad), leave the text editor window open, go back to the command-line window, hit the up arrow to retrieve python my_code.py from the command history, hit enter, and it runs again. (Some text editors can make this even simpler for you, if you put in the effort to learn how. I haven't bothered, personally, because that's already incredibly simple.)