RosettaCodeData/Task/Loop-over-multiple-arrays-simultaneously/Python/loop-over-multiple-arrays-simultaneously-4.py

10 lines
158 B
Python
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
>>> from itertools import zip_longest
2015-11-18 06:14:39 +00:00
>>> print ( '\n'.join(''.join(x) for x in zip_longest('abc',
'ABCD', '12345', fillvalue='#')) )
2013-04-10 21:29:02 -07:00
aA1
bB2
cC3
#D4
##5
>>>