title: Pygame loop not running
body: <p>I am trying to create a qr code generator as a small project. Currently it should only print 2 lines on the top of the screen. but the second for loop doesnt run at all. i changed the variables and such. I dont understand why the for loop doesnt activate at all.</p>
  <pre class="lang-py prettyprint-override"><code>import pygame,random,os
  pygame.init()
  rand=random.Random()
  #use https://www.qr-code-generator.com/
  
  #Setup
  WIDTH,HEIGHT=210,210
  WIN=pygame.display.set_mode((WIDTH,HEIGHT))
  pygame.display.set_caption(&quot;QR code generator&quot;)
  WIN.fill((255,255,255))
  x=0
  y=0
  dothisthing=True
  d=0
  f=0
  def doit(xm,ym):
    
    pygame.draw.rect(WIN, (0,0,0), pygame.Rect(xm,ym,10,10))
  
  
  for l in range(6):
    doit(d,f)
    pygame.display.update()
    d+=10
  d=14
  f=0
  for y in range(6):
    doit(d,f)
    pygame.display.update()
    d+=10
  
  
  
  run=True
  while run:
  
  
    for event in pygame.event.get():
      if event.type == pygame.QUIT:
        run=False  
    
    
    
    
  
  
    pygame.display.update()
  </code></pre>