Advertisement
dougbaker45

Count_time

Jun 18th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. import time
  2. count = 0
  3. delay = 60
  4. end = time.time() + delay
  5. start = time.time()
  6. countplus = 1000000
  7. countmark = countplus
  8. while start + delay > time.time():
  9.     count += 1
  10.     if count == countmark:
  11.         strlen = len(str(count))
  12.         countmark = countmark + countplus
  13.         countlst = []
  14.         countlst.append(count)
  15.         count = str(count)
  16.         if strlen == 4 or strlen == 5 or strlen == 6:
  17.             print(count[:-3], ',', count[-3:])
  18.             count = int(count)
  19.         if strlen == 7 or strlen == 8 or strlen == 9:
  20.             print(count[:-6], ',', count[-6:-3], ',', count[-3:])
  21.             count = int(count)
  22.         print(time.time() - start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement