Skip to content

Commit 5ac3e0c

Browse files
committed
remove useless list
1 parent 9b76ea9 commit 5ac3e0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/factoradic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ def int_to_factoradic(num: int) -> str:
3333

3434
start = Stream.counting(1).take_while(lambda n: factorial(n) <= num).last()
3535

36-
digits: list[int] = [
36+
digits = (
3737
num // f + (num := num % f) // f
3838
for f in Stream.range(start, stop=0, step=-1).map(factorial)
39-
]
39+
)
4040

4141
return Stream(digits).map(DIGITS.__getitem__).collect("".join)
4242

0 commit comments

Comments
 (0)