input: Write a function to generate a random password consisting of 8 characters. If the generated password meets the criteria, print it out.
  assert generate_password()!=""
  assert len(generate_password())==8
output: import random
  import string
  
  def generate_password():
      password = ''.join(random.choices(string.ascii_letters + string.digits, k=8))
      return password