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 -

mongodb - Multiple $and with multiple $or in $match mongoose -

Teradata TPT_INFRA: TPT02640: Error: Conflicting column count -