I’m trying to write a function find_day_of_week
that takes a date string in the format YYYY-MM-DD and returns the day of the week for that date. I’m looking for a solution in Python. Here is what I have so far:
def find_day_of_week(date_str: str) -> str:
pass
# Example Test Cases
# Input: "2024-06-27"
# Output: "Thursday"
# Input: "2024-01-01"
# Output: "Monday"
Could someone please guide me on how to implement this function? What is the best way to convert the date string to a day of the week in Python?