Feb-18-2019, 04:51 PM
(Feb-18-2019, 08:16 AM)Lonewolf Wrote: if the lists have the same lenght you could use something like that:
[Vals1[i]+Vals2[i] for i in range(len(Vals1))]
As ichabod801 already mentioned this is not Pythonic way i.e. needlessly complex and verbose. Just:
[sum(pair) for pair in zip(vals1, vals2)]However, this is not recursive solution what OP needs.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.