Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

py factors of a number

def find_factors(num: int) -> list:
    return [i for i in range(1, num + 1) if num % i == 0]
    
# print(find_Factors(6))
# [1, 2, 3]
 
PREVIOUS NEXT
Tagged: #py #factors #number
ADD COMMENT
Topic
Name
5+7 =