1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to repeat a line of code in the Python shell?

Discussion in 'Software/Coding' started by Trickmaster, Jun 21, 2015.

  1. Trickmaster

    Trickmaster Member

    Joined:
    May 23, 2014
    Messages:
    1,178
    Likes Received:
    926
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Potato Heaven
    In Minecraft, pressing the up arrow while in chat will repeat the last previously said message. How do you do the same with python, except repeating the last previously said line of code?
     
  2. Camel

    Camel Member

    Joined:
    Jun 12, 2015
    Messages:
    18
    Likes Received:
    19
    Trophy Points:
    3
    Alt + p for previous command from history, Alt + n for next command from history.

    This is default configure, and you can change these key shortcut at your preference from Options -> Configure IDLE
     
    Trickmaster likes this.
  3. Trickmaster

    Trickmaster Member

    Joined:
    May 23, 2014
    Messages:
    1,178
    Likes Received:
    926
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Potato Heaven
    What do you mean by Alt + n for next command?