Week 22 - Working with time

posted May 12, 2017, 8:03 AM by Attila Lengyel
import time

print(time.localtime(time.time()))
print(time.localtime(0))

print(time.asctime(time.localtime(time.time())))
print(time.asctime(time.localtime(0)))


print(time.tzname)

start = time.time()
string = input("Write something:")
end = time.time()
print(end - start)

for x in range(1,11):
  print(x)
  time.sleep(1)
  

Comments