How do I create a line-break in Terminal?

后端 未结 6 2236
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-08 05:48

I\'m using Python in Terminal on Mac OSX latest. When I press enter, it processes the code I\'ve entered, and I am unable to figure out how to add an additional line of code e.g

6条回答
  •  不思量自难忘°
    2021-02-08 06:33

    The answer here is far more simple. If you want to continue in the next line after a loop like

    while b<1:

    when you press enter you get prompted with

    ...

    then you "have to make an indent" by space of tab and only then you can put more code after the three dots like

    ... (tab or space) print b

    then when you press enter the code is not going to be executed but you get another ... where you can keep typing you code by making the new indent

    keep the indent the same

    that is it

提交回复
热议问题