print a list vertically without loop in python code example
Example 1: python program to print list vertically without using loop
lst = [1,2,3,4,5]
print(*lst,end="\n")
#output
1
2
3
4
5
Example 2: print list vertically in python with loop
# using * operator and sep = '\n'
scores = [11, 12, 13, 14, 15, 16]
print(*scores, sep = '\n')