title: how to create a french flag in python?
body: <p>I'm trying to create a french flag without using most of python's built in functions but for some reason my loop won't work... can anyone tell me why?</p>
  
  <pre><code>from PIL import Image
  def french():
      flag= Image.new('RGB', (300, 200))
      pixels=flag.getdata()
      pixs= list(pixels)
      r=0
      w=100
      b=200
      while True:
          for x in range(r,(r+100)):
              pixs[x]= (255,0,0)
              flag.putdata(pixs)
              r=+300
          for x in range(w,(w+100)):
              pixs[x]= (255,255,255)
              flag.putdata(pixs)
              w=+300
          for x in range(b,(b+100)):
              pixs[x]=(0,0,255)
              flag.putdata(pixs)
              b=+300
          return (r&gt;60000 or w&gt;60000 or b&gt;60000)
      flag.save('frenchflag.png')
  french()
  </code></pre>