1

I have this line of code:

d = {t.tag: {k:v[0] if len(v) == 1 else v for k, v in dd.iteritems()}}

Unfortunately I'm working on python 2.6 and it does not support dictionary comprehensions.

How should it look to make it work for python 2.6?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Asken
  • 7,679
  • 10
  • 45
  • 77

0 Answers0