search

Home  >  Q&A  >  body text

Python IDE提示的是什么意思?谢谢

PHP中文网PHP中文网2811 days ago333

reply all(6)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:53:52

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

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:53:52

    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.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:53:52

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

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:53:52

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

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:53:52

    If you are lazy, just add;

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:53:52

    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.

    reply
    0
  • Cancelreply