It’s not necessary to unpack and repack the tuples returned by zip:
'\n'.join(' '.join(x) for x in zip(a, b))
More Related Contents:
- Can someone explain what all the codes mean? PYTHON [closed]
- What is the fastest and pythonic way to generate a list [(0,0), (0,1), (0,2)…(0,100)]? [closed]
- the difference between zip and enumerat in for loop? [closed]
- Create a list of names whose height is higher than 160 – Explanation on nested dicts cycling [closed]
- One line recursive loop in python
- Multiple Factorials
- What is the most “pythonic” way to iterate over a list in chunks?
- Modifying list while iterating [duplicate]
- Iterate through pairs of items in a Python list [duplicate]
- Breaking out of nested loops [duplicate]
- Pygame clock and event loops
- Loop backwards using indices
- Python – TypeError: ‘int’ object is not iterable
- Pythonic way to combine for-loop and if-statement
- How do I stop tkinter after function?
- How do I save results of a “for” loop into a single variable?
- tkinter loop and serial write
- Loop until a specific user input is received in Python [duplicate]
- Iteration over list slices
- break and continue in function
- Why does a for-loop with pop-method (or del statement) not iterate over all list elements [duplicate]
- Check if key exists and iterate the JSON array using Python
- Python: Make class iterable
- Iterating over arbitrary dimension of numpy.array
- Using a loop to create and assign multiple variables (Python) [duplicate]
- Iterate through adjacent pairs of items in a Python list [duplicate]
- for or while loop to do something n times [duplicate]
- Loop over 2 lists, repeating the shortest until end of longest [duplicate]
- int object is not iterable while trying to sum the digits of a number? [duplicate]
- Skip over a value in the range function in python