Want to print a list vertically in python?

Submitted 3 years, 7 months ago
Ticket #177
Views 1080
Language/Framework Python
Priority Low
Status Closed

s = [1,20, 67, 21, 56, 13]
print(*s, sep = '\n')

this is the list I have 

I want this list to be printed vertically

Submitted on Sep 28, 20
add a comment

1 Answer

Verified

s = [1,20, 67, 21, 56, 13]
print(*s, sep = '\n')

output will be:

1
20
67
21
56
13

Submitted 3 years, 6 months ago


Latest Blogs