Element-wise addition of lists of various lengths
📁 Advanced Python Topics
There are two lists:
a = [ 1 , 2 , 3 ] b = [ 4 , 5 , 6 , 7 , 8 ] pre> I need to get the following result:
a + b = [ 5 , 7 , 9 , 7 , 8 ] I hope the meaning is clear. I only have crutches in my head, I would like to find a more or less adequate solution.
No answers yet.
Log in to leave an answer
Blogs
Security of C++ Applications: Top 10 Vulnerabilities and Protection Methods