by @kodeazy

How to get current timestamp in python?

Home » Python » How to get current timestamp in python?
  • To get the current time stamp in python we have time.time() function.
  • By importing time we can use time function,
  • Below is the sample example.

    import time
    ts=time.time()
    print(ts)

    Output:

    1648641514.6022162