Do control-P and control-N do what you want within an interactive Python session?
Open Terminal and type the word read. Press the return key, and then press the following keys in order: UpArrow, DownArrow, RightArrow, LeftArrow. Then press return and post the result. I get