Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

time module in python


this module is used to display the current date and time of the system with different time formats.
It is the most important module of python, If you want to display current time or difference between time then we always prefer the time module in Python.



.

Example of time module in Python:-



import time
print(time.time())
print(time.localtime(time.time()))
print(time.asctime(time.localtime(time.time())))





3 Comments

POST Answer of Questions and ASK to Doubt

  1. import time
    print(time.time)
    print(time.localtime(time.time()))
    print(time.asctime(time.localtime(time.time())))

    ReplyDelete
  2. import time
    second = time.time()
    print("second since epoch", second)

    ReplyDelete
  3. import time
    second = time.time()
    print("second since epoch", second)

    ReplyDelete

Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post