Python IDE提示的是什么意思?谢谢
PHP中文网
PHP中文网 2017-04-17 17:51:52
0
6
309

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(6)
洪涛

The command line mode cannot be copied directly, you have to type line by line

小葫芦

In fact, IDLE can only execute a single statement by default (a complete loop statement is counted as one, and IDLE is indented by default), so it is not recommended to copy multiple statements to IDLE for running.

洪涛

You pasted and copied the entire paragraph, right? After typing the first sentence, press Enter, and then you can paste and copy the rest.

小葫芦

Just use ipython
Then you can copy the code directly with %paste

巴扎黑

If you are lazy, just add;

大家讲道理

Meaning: Multiple statements were found when compiling a single statement.
Because Python is compiled one statement per line, when you paste multiple lines of code directly from some websites, the end of the line may not be 'n', so Python thinks that one line has multiple lines of statements and reports an error. You can copy it to another place first, re-edit the end of each line, just delete it and press Enter, and then run it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!