I'm trying to add two lists f and l as shown below. f and l don't have the same shape so I made the shape of f similar to l
f = [37.37, 34.26, 33.78, 33.82, 36.33]
f.append(f)
l = [[34.4 , 39.32, 35.61, 38.12, 34.11],
[33.1 , 35.14, 36.76, 33.66, 34.31]]
z = f + l
but I'm getting this strange output :
[37.37, 34.26, 33.78, 33.82, 36.33,
[37.37, 34.26, 33.78, 33.82, 36.33, [...]],
[34.4, 39.32, 35.61, 38.12, 34.11],
[33.1, 35.14, 36.76, 33.66, 34.31]]
I wasn't expecting [...]
, so I checked the value of f
and it was
[37.37, 34.26, 33.78, 33.82, 36.33, [...]]
different from before,
can someone explain to me what is happening here I'm quite new to python.