Python implements the method of inputting multiple lines in IDLE

不言
Release: 2018-04-19 11:37:44
Original
6603 people have browsed it

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 
>>>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template