python - printing CSV in a different way -


i need print out rankinglist csv file. can printed out, that's not problem this:

[['team1', '100'], ['team2', '200'], ['team3', '300']] 

i want print out this:

team1, 100 team2, 200 team3, 300 

i found knowledge of python/ english language isn't high enough understand being explained on other stackoverflow topics here have ask simple possible piece of code i'm using

def read():     = open('casus.csv','r')     areader = csv.reader(a)     = []     row in areader:         if len (row) != 0:             = + [row]     print(a) 

if have 2 elements in each list, should work.

def read():     = open('casus.csv','r')     areader = csv.reader(a)     row in areader:         if len(row != 0):             print(row[0]+","+row[1]) 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -