Check all are factors in the list
Problem to check all the list elements are divisible by k or not.
Input : n = [ 1, 2, 4, 8] , k = 8 Output : True Explain : k is divisible by all the list elements. So It's True.
Input : n = [ 1, 3, 5] , k = 5 Output : False Explain : K is not divisible by 3. So It's False.
n = [ 1, 2, 4, 8] k = 8 a = all([k % x == 0 for x in n]) print(a)