python - How to print string and list on same row without square brackets -


l = [1, 2] print "my numbers are:", l 

this gives me

my numbers are: [1, 2] 

but want

my numbers are: 1, 2 

i have seen ','.join(l) don't know how print out on same line.

for .join work have change every element str:

print ', '.join(map(str, l))


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -