I am new to Python. I would to print all elements in list using a single line of code. You may use lambda function.
a = [1,2,3,4]
for each in a:
print(each)
Here, I used two lines of code What I want is a single line of code to get the same output (preferably lambda function)
output required:
1
2
3
4
print(*a, sep='\n')