0

I have a dictionary that its value is a list and the values of the list are unicode , I would like to get them as a string , how do I go about geting them.

d = {'1':[u'06'],'2':[u'02',u'03',u'05',u'10']} 

output for key '2':

02,03,05,10

Thanks.

dansalmo
  • 11,506
  • 5
  • 58
  • 53
peztherez
  • 3,751
  • 5
  • 20
  • 21

1 Answers1

0
>>> d = {'1':[u'06'],'2':[u'02',u'03',u'05',u'10']}
>>> print ','.join([str(u) for u in d.get('2')])
02,03,05,10
dansalmo
  • 11,506
  • 5
  • 58
  • 53