input: Write a function to generate a random password consisting of 8 characters. The function should use ASCII letters and digits as the character set. If the function is called, it should return the generated password.
  assert generate_password()!=generate_password()
  assert len(generate_password())==8
  assert any(c in generate_password() for c in string.ascii_letters)
  assert any(c in generate_password() for c in string.digits)
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(8))