Contact: aviboots(AT)netvision.net.il
41,427 questions
53,974 answers
573 users
import math lst = [9, 12, 24, 27, 30, 36, 90] print(math.gcd(*lst)) ''' run: 3 '''
import math from functools import reduce def calculate_gcd(lst): return reduce(math.gcd, lst) lst = [9, 12, 24, 27, 30, 36, 90] print(calculate_gcd(lst)) ''' run: 3 '''