Idk why this error is happening?
My code is like this: >>> i=0 >>> while 1==1: print(i) i=i+1 if i>=5: print("breaking") break Then I press enter then left arrow key and write the remaining last line: print("Finished") Then an error occurs saying : "invalid syntax". I thought it'd happening because I pressed left arrow key before writing the last line, so I wrote it again like this: >>> i=0 >>> while 1==1: print(i) i=i+1 if i>=5: print("breaking") break print("Finished") Then the output came like: 0 finish 1 finish 2 finish 3 finish 4 Breaking But the desired output be like: 0 1 2 3 4 Breaking Finished Please help me understand this.