title: create function for rendering text in one line
body: <p>I'm trying to write a function to render text on the screen in one line.</p>
  <p>The below code is giving me a TypeError:</p>
  <blockquote>
  <pre><code>TypeError: argument 1 must be pygame.Surface, not None
  </code></pre>
  </blockquote>
  <p>Essentially, I don't want to do something like
  <code>textsurface = font.render(&quot;some text&quot;, False, (200, 200, 200)</code>
  <code>screen.blit(text_surface, (100, 300)</code></p>
  <p>Would rather somehow be able to do it all in one line?</p>
  <p>Not sure what I am doing wrong here.</p>
  <pre class="lang-py prettyprint-override"><code># Imports
  import sys
  import pygame
  
  # Configuration
  pygame.init()
  width, height = 640, 480
  screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
  
  # System Font
  font = pygame.font.SysFont('Garamond', 30)
  
  def write_text(text,anti_alias,colour):
      font.render(text,anti_alias,colour)
  
  # Game loop.
  while  True:
      screen.fill((20, 20, 20))
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              pygame.quit()
              sys.exit()
  
      screen.blit(write_text('haloooo', False, (200, 200, 200)), (100, 300))
  
      pygame.display.flip()
  </code></pre>