input: from typing import List
  
  def generate_password() -> str:
      """ Generate a random password that consists of 8 characters.
      The password should include both uppercase and lowercase letters, as well as digits.
      
      >>> generate_password()
      'aBc123dE'
      >>> generate_password()
      '4FgHiJk5'
      """
output:     
      import random
      import string
      
      characters = string.ascii_letters + string.digits
      password = ''.join(random.choice(characters) for _ in range(8))
      return password
  