0

When i press my enter key, it runs the code instead of allowing me to write another line of code

Koroski
  • 11
  • 2
  • Does this answer your question? [Python, writing multi line code in IDLE](https://stackoverflow.com/questions/10413637/python-writing-multi-line-code-in-idle) – Giancarlo Romeo Apr 22 '20 at 17:28

2 Answers2

0

No you cannot . but you can write loops functions this way. create a new file in your ide. save that file and run your code

0

you can use a '\' for continuing the code to multiple lines in python interpreter.

>>> x = 1;\
... print(x); \
... y=2; \
... print(y)
1
2
Rajat Mishra
  • 3,635
  • 4
  • 27
  • 41