I'm surprised I have to ask this question, even more surprised that it hasn't already been asked. Is there a way to undo a delete in Pythonista (without attaching an external keyboard)? It is SO easy to be selecting text and the bottom part of the hand or another finger accidentally touches the keyboard and BANG, a huge block of text is deleted and no way to recover it.
@tedtoal Pythonista has an extended keyboard, which contains an 'undo' button. There should be a extra key row above the normal keys. If it is not there, you may have disabled it somewhere.
If you're on an iPad, there should be an undo button in the bottom row of the extended keyboard, as @bennr01 says. If you don't see that button (or the entire row), you need to go into the iOS keyboard settings and enable the "shortcut bar" (or whatever it's called in your device language). In addition, the iPad onscreen keyboard has built-in "keys" for undo and redo, which can be found in the ".?123" and "#+=" modes of the keyboard.
If you're on an iPhone (or iPod touch), I think the only way to get an undo function is by shaking the device. (Yes, it's really silly. I'm sure ten years ago everyone thought it was a great idea.) If you have one of the larger iPhones, I think you also get extra buttons (including undo) on the onscreen keyboard when in landscape mode. I have an iPhone SE, so I don't know where and how the extra buttons are available (except that I don't have them :P).
@dgelessus, on iPhone the undo is available by long-pressing the rightmost aux key,
Not very convenient when you need to do it several times, but still better than shaking.