RosettaCodeData/Task/Factors-of-an-integer/Python/factors-of-an-integer-1.py
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

2 lines
73 B
Python

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