Iterating through all the prime numbers and check if any of the prime numbers is a factor of the given input array
for i in allPrimes : NEW_LINE INDENT for j in arr : NEW_LINE INDENT if ( j % i == 0 ) : NEW_LINE INDENT list1 . append ( i ) NEW_LINE break NEW_LINE DEDENT DEDENT DEDENT return list1 NEW_LINE