Is there a quick way to decrease the indentation of multiple lines in Python?
In vim, you select the block and then press the < key.
In Eclipse you select it and then press SHIFT + TAB.
Every code editor worth its salt has a one-key way to indent and dedent blocks.
You could also replace the if statement with:
if True: # if i < 5:
and leave everything else alone - no indent/dedent to undo later.
Perhaps late for your case, but if useful for others:
SHIFT + TAB will do unindent for the selected text in Eclipse.