Write a Python program to display the date and time in a human-friendly string


This program is written in Python and it imports the "time" module. The "time" module provides the "ctime" function, which returns a string representation of the current time in the format "Tue Feb 8 08:51:45 2022" . The line "print(time.ctime())" calls the "ctime" function and prints its result to the console. This result represents the current date and time.

Source Code

import time
print(time.ctime())

Output

Sat Sep 24 13:29:53 2022

Example Programs