Printing a List : String join « String « Python






Printing a List

Printing a List



li = ['a', 'b', 'c'] 
print "\n".join(li)  

# This is also a useful debugging trick when you're working with lists. 

           
       








Related examples in the same category

1.Joining stringsJoining strings
2.Join a listJoin a list
3.String JOINString JOIN
4.split and joinsplit and join
5.Splitting a StringSplitting a String