how do I print the string line without preparing from advance the {} places. Because now my function needed only 6 places, but if I'll change the input (n,m) I'll need different number of {}. How to define it?
def all_pairs_sum(m,n):
sum = 0
mult = []
for m in range(1,m+1):
for n in range(1,n+1):
l = m*n
mult.append(l)
sum = sum + m*n
print(m," * ", n, " = ", l)
print("{}+{}+{}+{}+{}+{} =".format(*mult))
return sum
print (all_pairs_sum(2,3))
'+'.join(mult)?