How to use itertools to print sequence datasets in Python

1 Answer

0 votes
from itertools import *     

for dt in chain([1, 2, 3, 4], ['python', 'java', 'php']):         
    print(dt, end=' ')  
    
    
    
'''
run:

1 2 3 4 python java php 

'''

 



answered May 19, 2019 by avibootz
...