how to get day in python code example
Example 1: python get day name
import datetime
now = datetime.datetime.now()
print(now.strftime("%A"))
Example 2: python date get day
import datetime
dt = datetime.datetime.today()
year = dt.year
month = dt.month
day = dt.day
Example 3: python datetime get weekday name
import datetime
now = datetime.datetime.now()
print(now.strftime("%A"))