Python ProgrammingPython Programming

How do I get the day of week from given date in Python?

import datetime
import calendar

dt = datetime.datetime(2021, 4, 25, 23, 24, 55, 173504)
print(calendar.day_name[dt.weekday()])
Output
Sunday