Adding more than one list
Question: I want to try the many ways the function of python So, I want to not use zip
use other python function ,how can i do to?

this is use zip and adding more than one list: but i want to other way not use
zip:

    
    
    x = [12, 22, 32, 42, 52, 62, 72, 82, 29]
    y = [10, 11, 12, 13, 14, 15, 16, 17, 18]
    
    def add_list(i, j):
        l = []
        for n, m in zip(x, y):
            l.append(n + m)
        return l
    

i know this way,


Answer: **without** using `zip`, you can use `map`:

    
    
    from operator import add
    
    x = [12, 22, 32, 42, 52, 62, 72, 82, 29]
    y = [10, 11, 12, 13, 14, 15, 16, 17, 18]
    res = map(add, x, y)
    # [22, 33, 44, 55, 66, 77, 88, 99, 47]
    

Note that if the iterables are of different lengths, than the shortest will be
padded with `None` which will cause a `TypeError` in the `add` instead of
`zip` which will truncate to the shortest list.

**On an aside** there's absolutely nothing wrong with using `zip` \- I'd
probably re-write it as a list-comp though, eg:

    
    
    [sum(items) for items in zip(x, y)]
    

This then scales easily to doing `zip(x, y, z, another_list)` etc...

