input: Write a function to generate a random password of 8 characters consisting of letters and digits.
  assert generate_password()!="password"
  assert len(generate_password())==8
  assert isinstance(generate_password(), str)
  assert any(c.isdigit() for c in generate_password()) and any(c.isalpha() for c in generate_password())
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(8))