About the printing function
Hi everyone, I faced some problems in understanding the indentation, for example: i = 0 while True: i = i +1 if i == 2: print("Skipping 2") continue if i == 5: print("Breaking") break print(i) print("Finished") The python sololearn playground will play the answer as: >>> 1 Skipping 2 3 4 Breaking Finished >>> But when I type the same thing in the python idle, it always shows the invalid syntax, such that I can only input something like this: >>> i=0 >>> while True: i=i+1 if i == 2: print("Skipping 2") continue if i == 5: print("Breaking") break print(i) 1 Skipping 2 3 4 Breaking >>> print("Finished") Finished >>> I am wondering how I can type the print("Finished") outside the while loop. It seems that click enter twice will directly run the loop and not allowing me to type the print function anymore. Would there be anyone can help me solve this problem?