Home  >  Article  >  Backend Development  >  Python implements the method of inputting multiple lines in IDLE

Python implements the method of inputting multiple lines in IDLE

不言
不言Original
2018-04-19 11:37:446578browse

The following is a python method for inputting multiple lines in IDLE. It has a good reference value and I hope it will be helpful to everyone. Let’s take a look together

In python command line mode, enter multiple lines in IDLE, such as if else

Use tab to control the indentation

at the end , two consecutive carriage returns, indicating the end

>>> if state: 
...  print "ok" 
... else: 
...  print "wrong" 
... 
wrong 
>>>

Related recommendations:

Detailed explanation of dictionary traversal operation implemented in Python3

The above is the detailed content of Python implements the method of inputting multiple lines in IDLE. 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