Display time

 import datetime


# get current time

current_time = datetime.datetime.now()


# convert current time to string format

time_str = current_time.strftime("%H:%M:%S")


# display current time

print("Current time is:", time_str)

Comments

Popular posts from this blog

Ecommerce website

Yes, Python is an object-oriented programming (OOP) language, but it is also a multi-paradigm language

Your task is to find the missing number.