input: Write a function to generate a random password consisting of 8 characters. The password should include both uppercase and lowercase letters, as well as digits. If the function is called with no arguments, it should return a string of 8 random characters.
  assert generate_password() in string.ascii_letters + string.digits and len(generate_password())==8
  assert generate_password() != generate_password()
  assert set(generate_password()).difference(string.ascii_letters + string.digits) == set()
output: import random
  import string
  
  def generate_password():
      return ''.join(random.choices(string.ascii_letters + string.digits, k=8))