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
  • 963,270
  • 265
  • 3,804
  • 3,187
Asken
  • 7,319
  • 9
  • 42
  • 74

0 Answers0