Write a program to display date and time
Topic: Write a program to display date and time
Solution
import datetime now = datetime.datetime.now() time= now.strftime("%Y-%m-%d %H:%M:%S") print(f"Current date and time : {time}")
List all Python Programs