input: Write a function to generate a random password consisting of 8 characters. The password should include a mix of uppercase and lowercase letters and digits. If the given input is invalid, return an empty string.
  assert generate_password()==True
  assert generate_password([3, 4, 5, 1, 2])==True
output: import random
  import string
  
  def generate_password(input=None):
      if input is not None and not isinstance(input, list):
          return ""
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(8))