Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does Python break lines when entering code in an interactive environment? You can execute the program directly every time you press Enter, but the code is not finished yet.
How does Python break lines when entering code in an interactive environment? You can execute the program directly every time you press Enter, but the code is not finished yet.
1. Use the win+r key to enter the command line mode of windows.

2, or enter through the search function that comes with win 10.

3. In the command line mode with Python running environment configured.

4. After entering Python, enter the final Python command prompt.

5. If there is no line break, the printed statement is as follows.

6. Use Python's \ to enter a new line in the string.

7. Finally, the effect of using \ is as follows. You can see that the last few lines of strings are spelled into a string and then printed.