How to concatenate several iterators in Python

1 Answer

0 votes
from itertools import *

for i in chain([1, 2, 3, 4], ['a', 'b', 'c']):
    print(i)



'''
run:

1
2
3
4
a
b
c
 
'''

 



answered Jul 26, 2019 by avibootz

Related questions

1 answer 164 views
1 answer 177 views
1 answer 138 views
1 answer 173 views
1 answer 186 views
...