RosettaCodeData/Task/Factors-of-an-integer/Python/factors-of-an-integer-1.py
2023-07-01 13:44:08 -04:00

2 lines
73 B
Python

>>> def factors(n):
return [i for i in range(1, n + 1) if not n%i]