title: Adding to dictionary in for loop and progressbar update with two statements
body: <p>In gdic I have 3 keys (1,2,3) and values. In page I have two equals for two keys (1,3). Why to pdic are added only one value? "lol" is printed twice, but it must be printed once, yeah? Progress bar doesn't work correctly for this.    </p>
  
  <pre><code>    length = len(self._gdic)
      count = 1.0
      count2 = 1
      pbar = ProgressBar().start()
  
      for k in self.gdic.keys():
          for i in page:
              if (k == i[0].decode('utf-8')): 
                  pdic[i[0]] = i[2].lower() 
                  percent_done = count / length
                  percent_done = round(percent_done * 100)
                  pbar.update(percent_done)
                  count += 1.0
                  count2 = 1
                  break
              elif (count2 == length):
                  percent_done = count / length
                  percent_done = round(percent_done * 100)
                  pbar.update(percent_done)
                  count += 1.0
                  count2 = 1
                  print("lol")
                  break
              else:
                  count2 += 1
                  continue
      pbar.finish()
  </code></pre>
  
  <p><strong>Edit:</strong>  Okay, I probably found the solution.</p>
  
  <pre><code>    length = len(page)
      length2 = len(self.gdic)
      count = 1.0
      count2 = 1
      pbar = ProgressBar().start()        
      for k in self.gdic.keys():
          for i in page:
              if (k == i[0].decode('utf-8')): 
                  pdic[i[0]] = i[2].lower() 
                  percent_done = count / length2
                  percent_done = round(percent_done * 100)
                  print("ss")
                  print k
                  pbar.update(percent_done)
                  count += 1.0
                  count2 = 1
                  break
              else:
                  if (count2 == length):
                      percent_done = count / length2
                      percent_done = round(percent_done * 100)
                      print("lol")
                      print k
                      pbar.update(percent_done)
                      count += 1.0
                      count2 = 1
                      continue
                  count2 += 1
      pbar.finish()
  </code></pre>
  
  <h2><strong>Description:</strong></h2>
  
  <p>Length of <em>page (dict)</em> can be different than length of <em>gdic (dict)</em>. If we found <em>k</em> in <em>page</em>, the progress bar is updating and <em>count2</em> is setting to default value. If <em>k</em> is not in <em>page</em>, we must check <em>count2</em> and <em>length (of page)</em> values. If they are same, we update the progress bar and set <em>count2</em> to default value. If they are not same, we increase <em>count2</em>. I am using printing to check working of this solution.</p>