This commit is contained in:
Vombit
2026-05-27 15:52:14 +05:00
parent d940e1dd2f
commit 801bafd8ba
4 changed files with 35 additions and 0 deletions

8
solutions/lc1507.py Normal file
View File

@@ -0,0 +1,8 @@
class Solution:
def reformatDate(self, date: str) -> str:
month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
d = date.split(" ")
return f"{d[2]}-{month.index(d[1])+1:02}-{int(d[0][:-2]):02}"