mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-21 20:47:10 +08:00
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -14,7 +14,7 @@ def date_to_weekday(inp_date: str) -> str:
|
||||
>>> date_to_weekday("1/1/2021")
|
||||
'Friday'
|
||||
"""
|
||||
day, month, year = [int(x) for x in inp_date.split("/")]
|
||||
day, month, year = (int(x) for x in inp_date.split("/"))
|
||||
if year % 100 == 0:
|
||||
year = "00"
|
||||
new_base_date: str = f"{day}/{month}/{year%100} 0:0:0"
|
||||
|
Reference in New Issue
Block a user