dt. day of the week in python

You can use the datetime module in Python to get the day of the week. Here's an example:

main.py
import datetime

# Get the current date
current_date = datetime.date.today()

# Get the day of the week
day_of_week = current_date.strftime("%A")

print(day_of_week)
166 chars
10 lines

This will output the current day of the week in a long format, such as "Monday", "Tuesday", etc.

related categories

gistlibby LogSnag