Hello,

I have a multimap dictionary with a 1 Key to N values.  I want to convert
the N values to a string to be used elsewhere in my program.

So I have dict[(1,[1, 2 ,3 ,4])] which I have sorted

When I do a print ''.join(str(dict.value())) I get [1, 2, 3, 4] as an output
when I really want 1 2 3 4

Here is my code:

dmapItems = dictionary.items()
dmapItems.sort()

for tcKey, tcValue in dmapItems:
    file.write('Key = %s\nValue = %s" % (tcKey, tcValue)

stinger = ''.join(str(tcValue))

print stringer

The Output = [145, 2345, 567, 898]
I need it to be 145 2345 567 898


Can anyone see the errors of my ways?

Thanks,
Ron
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to