mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +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:
@ -30,11 +30,9 @@ def solution(a: int = 100, b: int = 100) -> int:
|
||||
# RETURN the MAXIMUM from the list of SUMs of the list of INT converted from STR of
|
||||
# BASE raised to the POWER
|
||||
return max(
|
||||
[
|
||||
sum([int(x) for x in str(base ** power)])
|
||||
for base in range(a)
|
||||
for power in range(b)
|
||||
]
|
||||
sum(int(x) for x in str(base ** power))
|
||||
for base in range(a)
|
||||
for power in range(b)
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user