Program - True and False in the datetime module


Topic: Program - True and False in the datetime module

Solution

from platform import python_version
import datetime
print("Current python version: ", python_version())
print('"datetime.time(0,0,0)" (Midnight) ->', bool(datetime.time(0,0,0))) # Python version <= 3.4.5 evaluates this statement to False



List all Python Programs