This could be what you are looking for
if len(a) < len(b):
c = b.copy()
c[:len(a)] += a
else:
c = a.copy()
c[:len(b)] += b
basically you copy the longer one and then add in-place the shorter one
This could be what you are looking for
if len(a) < len(b):
c = b.copy()
c[:len(a)] += a
else:
c = a.copy()
c[:len(b)] += b
basically you copy the longer one and then add in-place the shorter one