title: Is there a simple one-liner for accessing each element of a nested dictionary in Python?
body: <p>I often use nested dictionaries in Python 2.7 with 3 or more tiers and use a nested for loop structure, as shown below, to access each element. does anyone know of a simpler, neater or faster method to do so?</p>
  
  <pre><code>for foo in mydict:
      for bar in mydict[foo]:
          for etc in mydict[foo][bar]:
              mydict[foo][bar][etc] = "value"
  </code></pre>