input: from typing import List
  
  def generate_password() -> str:
      """Generate a random password of 8 characters, containing letters and digits.
      >>> generate_password()
      'aB3dEfG7'
      >>> generate_password()
      'K9Lm2NpQ'
      """
      import string
      import random
      
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))
output:     import string
      import random
      
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))