0
A Python program to display the current date and time
s=input (" today is: ") print(s) y=input("time is: ") print(y) Did someone have a better way to write it ?
5 Respuestas
0
import time
# 24 hour format
y = time.strftime("%H:%M:%S")
# 12 hour format
y = time.strftime("%I:%M:%S")
# dd/mm/yyyy format
x = time.strftime("%d/%m/%Y")
0
Thank you. there is any way you can explain the program to me? when I click on run it doesn't work
0
thanks you again I figure it out
0
1) What is the difference between the capital and the lower case letter when is comes to time? I have been playing with both and I gate difference answers but I can find a good explanation on the internet.
2) what is the code for the local time in python. a link with time code will be helpful to
0
https://docs.python.org/3/genindex-all.html