how to get current time stamp in seconds in python code example Example: python print timestamp import datetime ts = datetime.datetime.now().timestamp()