Printing a list of lists, without brackets
The following will do it:
for item in l:
print item[0], ', '.join(map(str, item[1:]))
where l
is your list.
For your input, this prints out
tables 1, 2
ladders 2, 5
chairs 2
If you don't mind that the output is on separate lines:
foo = [["tables", 1, 2], ["ladders", 2, 5], ["chairs", 2]]
for table in foo:
print "%s %s" %(table[0],", ".join(map(str,table[1:])))
To get this all on the same line makes it slightly more difficult:
import sys
foo = [["tables", 1, 2], ["ladders", 2, 5], ["chairs", 2]]
for table in foo:
sys.stdout.write("%s %s " %(table[0],", ".join(map(str,table[1:]))))
print