title: Build a nested menu using python
body: <p>I'm working on a GUI for a LCD screen connected to a Raspberry PI.</p>
  
  <p>I'd like to build a menu from a dict like this :</p>
  
  <pre><code>my_menu = {
      "menu1": {
          "submenu1": {
              "subsubmenu1": None
          },
          "submenu2": None,
          "submenu3": None,
      },
      "menu2": {
          "submenu1": None,
          "submenu2": None,
      }
  }
  
  for item in my_menu:
      print(item)
  }
  </code></pre>
  
  <p>I'd like to keep the same order as defined in the dictionary.</p>
  
  <p>The problem is that python dictionaries are unordered and the menu items on the LCD screen are not displayed in the right order.</p>
  
  <p>That way I could make it work easily in JS (using json) or PHP (using arrays), but I just start using python and I have no idea of the best way to do it in that language.</p>
  
  <p>I have read some articles about OrderedDict but I'm not sure it's a good idea.</p>
  
  <p>So my question is "how to do it in a clean and efficient way".</p>
  
  <p>My code runs under python 2.7 but I can upgrade the version if necessary.</p>
  
  <p>Thanks for your time !</p>