title: How to slowly draw a line in Python
body: <p>I want to slowly draw a line in python so the act of drawing is actually visible to the naked eye.</p>
  
  <p>I tried making it by putting it in a loop and increasing the distance each time but i never had any success with it. The thing is nothing would appear for 3 sec and then the whole line would appear which is the opposite of what i want to accomplish. I didn't have success with a <code>pygame.display.delay()</code> function either. The only thing that kind of worked is having clock.tick set to some abysmal values such as <code>clock.tick(300000)</code> but this would just make the entire program really laggy.</p>
  
  <pre><code>def draw_red_line(i):
      y = 0
      while y &lt; 300:
          pygame.draw.line(screen, RED, (i*100+50, 0), (i*100+50, y))
          y+=0.01
  </code></pre>