Home>Article>Backend Development> How to undo the wrong typing in python

How to undo the wrong typing in python

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-05-17 15:59:19 26760browse

Recall method: Under the Windows operating system, you can use "backspace" to recall the entered characters; under some Unix-like systems, you can use "delete" to recall the entered characters; under Ubuntu, use " ctrl backspace" to recall the entered characters.

How to undo the wrong typing in python

The operating environment of this tutorial: windows7 system, python3 version, Dell G3 computer.

How to delete input errors in python?

Python's commonly used input function raw_input(), if you make a mistake during the input process, you cannot backspace to cancel the entered characters like you can on the command line, and you have to re-enter.

How can I cancel the input character backspace similar to the command line?

This problem is caused by different operating systems:

  • Under the Windows operating system, if raw_input() makes a mistake during the input process, you can use backspace cancels the entered characters;

  • In some Unix-like systems, delete is used instead of backspace;

  • Under Ubuntu , delete will not work, but ctrl backspace will.

Related free learning recommendations:python video tutorial!

The above is the detailed content of How to undo the wrong typing in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn