input: def generate_password():
      """Generate a random password of 8 characters consisting of letters and digits.
      >>> generate_password()
      'aB3dN7zQ'
      """
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))
output:     import string
      import random