title: Iterate over nested lists, tuples and dictionaries
body: <p>I've another question to the thematic of <a href="https://stackoverflow.com/questions/11501090/iterate-over-nested-lists-and-dictionaries">Iterate over nested lists and dictionaries</a>.</p>
  
  <p>I need some extended functionality to the topic of the link above. The iterable element now also contains <strong>tuples</strong>. Also integers in tuples need to be converted to a hex string. Therefor I tried with following code, to convert the tuples to lists.</p>
  
  <pre><code>for path, value in objwalk(element):
      if isinstance(value, tuple):
          parent = element
          for step in path[:-1]:
              parent = parent[step]
          parent[path[-1]] = list(value)
  </code></pre>
  
  <p>But my problem is, that tuples in tuples are not converted. How can I convert "sub-tuples" to lists in an elegant way?</p>
  
  <p>Best regards
  wewa</p>
  
  <p>PS: I created a new topic, because the other-one is fixed for me.</p>