I am using macOS Mojave and Iterm2: 3.2.7beta4. This is an issue I am seeing with python3 interpreter. When I type the arrow keys to move the cursor or to run the last command, I see
^[[A, (with up key) ^[[B (with down)
instead on the terminal. Its not the case with python2. I have checked the key bindings on iterm and nothing seems to be causing this. Does anyone have an idea about this?