In ipython, we can use
_ih[32:39]
To show history lines between 32 and 39. How can I directly execute these history lines?
You can edit lines before executing them like so:
edit 1-5
Apparently the syntax changed at some point from the list-notation used in dreynold's answer.