user
Create a program that determines the day of the week for a given date.

Date: 5th January, 2021.


assistant
def get_day_of_week(date):
  # This function takes in a date as a string and returns the day of the week. 
  from datetime import datetime
  date_formatted = datetime.strptime(date, '%d %B, %Y')
  day_of_week = date_formatted.strftime("%A")
  return day_of_week
  
result = get_day_of_week("5th January, 2021")
print(result)

# Output 
Thursday