0

Python.Why do i get a blank page when i run this code

from time import time, ctime prev_time="" while(True):curr_time=ctime(time()) if(prev_time !=curr_time):print("The time is:",ctime(time)) prev_time = curr_time

19th Mar 2017, 9:41 AM
Peet Van Der Walt
Peet Van Der Walt - avatar
1 ответ
+ 3
I think the problem is that only the line after the beginning of the while-loop is in that infinite loop. You should intend the other lines with a tab.
19th Mar 2017, 9:50 AM
lulugo
lulugo - avatar