Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime, pygame
- pygame.init()
- secondtick = pygame.time.Clock()
- timestr = str(datetime.datetime.now().time())
- timelist = list(timestr)
- timex = 1
- while timex <= 6:
- timelist.pop(0)
- timex += 1
- timex2 = 1
- while timex2 <= 7:
- timelist.pop(2)
- timex2 += 1
- secondstr1 = str("".join(timelist))
- while 1:
- timestr = str(datetime.datetime.now().time())
- timelist = list(timestr)
- timex = 1
- while timex <= 6:
- timelist.pop(0)
- timex += 1
- timex2 = 1
- while timex2 <= 7:
- timelist.pop(2)
- timex2 += 1
- secondstr2 = str("".join(timelist))
- x = 1
- if int(secondstr2) - x == int(secondstr1):
- print(x)
- x += 1
- C:Python32python.exe "C:/Users/depia/PycharmProjects/testing/test.py"
- Traceback (most recent call last):
- File "C:/Users/depia/PycharmProjects/testing/test.py", line 31, in <module>
- timelist.pop(2)
- IndexError: pop index out of range
- Process finished with exit code 1
- -- code --
- time.sleep(1)
- secondstr2 = str("".join(timelist))
- -- more code --
- C:Python32python.exe "C:/Users/depia/PycharmProjects/testing/test.py"
- 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement