мой ответ:
Код: Выделить всё
while True :
date = input("Date: ").strip().title()
months_list = { "January": "01",
"February": "02",
"March":"03",
"April":"04",
"May":"05",
"June":"06",
"July":"07",
"August":"08",
"September":"09",
"October":"10",
"November":"11",
"December":"12" }
try:
month_day , year = date.split(",")
month , day = date.split()
month = int(months_list[month])
except ValueError :
month , day , year = date.split("/")
month = int(month)
day = int(day)
year = int(year)
if month
Подробнее здесь: [url]https://stackoverflow.com/questions/78706690/python-cs50p-outdated-py-can-someone-please-tell-me-where-am-i-going-wrong[/url]