mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 02:13:15 +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:
@ -66,7 +66,7 @@ def sum_digit_factorials(n: int) -> int:
|
||||
"""
|
||||
if n in CACHE_SUM_DIGIT_FACTORIALS:
|
||||
return CACHE_SUM_DIGIT_FACTORIALS[n]
|
||||
ret = sum([DIGIT_FACTORIALS[let] for let in str(n)])
|
||||
ret = sum(DIGIT_FACTORIALS[let] for let in str(n))
|
||||
CACHE_SUM_DIGIT_FACTORIALS[n] = ret
|
||||
return ret
|
||||
|
||||
|
Reference in New Issue
Block a user