+ 4

How do you print the time in python?

3rd Feb 2018, 2:31 AM
Logan Tilly
Logan Tilly - avatar
2 Réponses
+ 19
import datetime value= datetime.datetime.now() print(value) To get value of time in ur timezone , u need to make it aware.. You can use the documentation for additional information
3rd Feb 2018, 3:24 AM
Frost
Frost - avatar
+ 5
More on the datetime module: https://docs.python.org/3.6/library/datetime.html
3rd Feb 2018, 3:26 AM
Pedro Demingos
Pedro Demingos - avatar