Answers for "code return time in python"

7

python show current time

from datetime import datetime

now = datetime.now()

current_time = now.strftime("%H:%M:%S")
print("Current Time =", current_time)
Posted by: Guest on April-29-2020
21

python time library

#also see datetime
import time
now = time.time()
print(now)
Posted by: Guest on February-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language