Obaid Obaid - 5 months ago 28
Python Question

printing list in python properly

So I have a list:

['x', 3, 'b']

And I want the output to be:

[x, 3, b]

How can I do this in python?

If I do
str(['x', 3, 'b'])
, I get one with quotes, but I don't want quotes.

mylist = ['x', 3, 'b']
print '[%s]' % ', '.join(map(str, mylist))