How to get the last executed command in IDLE as in R? <p>When I use R and execute a command in the command window, I can just press up and I get the last executed command in the current command line. What key do I need to press in order to get the same in Python? </p> <p>Edit: When I asked this question, I did not know what IDLE or iPython is. I just googled "download python" and downloaded it. But now I know I am using IDLE.</p>