I am trying to write a function (for academic reasons) that multiply every number in this list : list = [6 , [1, 2, 3]]
I have tried this solution:
def grow(arr):
for num in arr:
x = num
x * num
for value in num:
y = value * num
return y * x
But I keep getting: TypeError: 'int' object is not iterable someone help me understand please. The expected output should be: 36. The function should do this: 6 * 1 * 2 * 3