>>> l = [1, 2, 3] >>> print(' '.join(str(x) for x in l)) 1 2 3 >>> print(' '.join(map(str, l))) 1 2 3