input: Write a function that generates a random password consisting of 8 characters.
  assert generate_password()!=''
  assert len(generate_password())==8
output: import random
  import string
  
  def generate_password():
      return ''.join(random.choices(string.ascii_letters + string.digits, k=8))