R
R
researcher11112017-12-21 23:22:10
Python
researcher1111, 2017-12-21 23:22:10

Print time in seconds python3?

How to print only the current seconds in python?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pcdesign, 2017-12-21
@researcher1111

import datetime
print("Current second: %d" % datetime.datetime.now().second)

P
Pavel, 2017-12-22
@Kademn

import time

time.time()

https://docs.python.org/3.6/library/time.html#time.time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question