how to print list using for loop in python
list = [1,"bob",4,"life",5] # with loop for i in list: print(i) >>> 1 bob 4 life 5 x = [print(i) for i in list] >>> 1 bob 4 life 5 # without loop print(*list, sep = "\, ") >>> 1, bob, 4, life, 5 print(' '.join(map(str, list))) >>> 1 bob 4 life 5