input: from typing import List
  
  def generate_password() -> str:
      """ Generate a random password with exactly 8 characters, consisting of letters 
      and digits.
      >>> password = generate_password()
      >>> len(password)
      8
      >>> any(c.isdigit() for c in password)
      True
      >>> any(c.isalpha() for c in password)
      True
      """
output:     import random
      import string
      
      characters = string.ascii_letters + string.digits
      password = ''.join(random.choice(characters) for _ in range(8))
      return password