import math
def lista_fact(list, k):
for n in list:
result = math.factorial(n) / (math.factorial(k) * math.factorial(n - k))
return result
print(res)
lista = [4, 6, 5]
print(lista_fact(lista, 3))
The output of the code about is showing me only the factorial result for the last element from my list. How should I code to take all the elements from that list?