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!