input: Write a function to generate a random password of 8 characters consisting of letters and digits. The function should not take any input and should return the generated password as a string.
  assert generate_password() != generate_password(), "Each call should generate a different password"
  assert len(generate_password()) == 8, "The password should be exactly 8 characters long"
  assert any(c.isdigit() for c in generate_password()), "The password should contain at least one digit"
  assert any(c.isalpha() for c in generate_password()), "The password should contain at least one letter"
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(8))