When i press my enter key, it runs the code instead of allowing me to write another line of code
Asked
Active
Viewed 986 times
0
-
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 Answers
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

hadiya asif
- 3
- 3
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