title: Nested Python Dictionary with Variables
body: <p><em>Why I'm writing this code:</em> I'm attempting to create script that pulls data from excel and drops it into PowerPoint. It should detect the tab color to indicate if multiple charts appear on the slide.</p>
  
  <p>So far, the data seems to be pulling into the data_dict variable appropriately, charts meant to be on the same slide are not all pulling in only the <em>very last</em> chart data ends up in the slide_data dictionary.</p>
  
  <pre><code>slidecount = 0
  for wksht in wb.sheetnames:
          combinecount = 1
          if tabcolor is not None:
              if tabcolor == most_recent_tabcolor:
                  combinecount += 1
                  slidecount -= 1
              else:
                  combinecount = 1  # Resets to one
              most_recent_tabcolor = tabcolor
          else:
              combinecount = 1  # Resets to one
  
          '''
          Placed after combinecheck para place correctly in dictionary 
          '''
          infolist = [intended_chart, data_question, data_base, forcefloat, forcepercent]
          slide_data[slidecount] = {}
          slide_data[slidecount][combinecount] = {'Chart Data': data_dict, 'Chart Info': infolist}
          slidecount += 1
  </code></pre>
  
  <p>I expected the following output:
  0, {1: { 'Chart Data' ... } 2: {'Chart Data' ... } 3: {'Chart Data' ... }}</p>
  
  <p>I get:
  0, {3: {'Chart Data' ... }}</p>