input: from typing import List
  
  def print_pattern(size: int) -> None:
      """Prints a grid of alternating '#' and ' ' characters based on the size.
      >>> print_pattern(7)
      ## ## ## 
       ## ## ##
      ## ## ## 
       ## ## ##
      ## ## ## 
       ## ## ##
      ## ## ## 
      """
      for i in range(size):
          for j in range(size):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()
output:     for i in range(size):
          for j in range(size):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()