input: Write a python function to generate a password with at least one uppercase letter, one lowercase letter, and one digit.
  assert len(generate_password()) == 8
  assert any(c.islower() for c in generate_password())
  assert any(c.isupper() for c in generate_password())
  assert any(c.isdigit() for c in generate_password())
output: def generate_password():
      import random
      import string
  
      while True:
          password = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(8))
          if (any(c.islower() for c in password) and
              any(c.isupper() for c in password) and
              any(c.isdigit() for c in password)):
              return password