Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

all factors, factors of a number, factors

from functools import reduce

def factors(n):    
    return set(reduce(list.__add__, 
                ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #factors #factors
ADD COMMENT
Topic
Name
4+7 =