When working with Python, I often use the iPython notebook.
I had a problem the other day. The cell in which I wrote the script seemed to hit something on the keyboard by mistake and disappeared.
The cause was that I pressed "x (lowercase alphabetic)". The iPython notebook seems to have "Edit mode" (focused on the textbox) and "Command mode" (not focused on the textbox; press Esc to enter this mode), "Command It seems that there was "Delete cell" in the shortcut when "mode". That was the "x".
You can check the shortcut list from Help as follows.
Below is a list.
The solution is simple. You can undo the cell deletion by pressing "z" in "Command mode" in the shortcut!
I haven't used the iPython notebook shortcut so far, so I'd like to use it. Even if you do not use it, you need to be careful because unexpected behavior will occur if you do not know its existence.
Recommended Posts