input: Write a python function to generate a random password containing a mixture of lowercase letters, uppercase letters, digits, and symbols.
  assert len(generate_password()) == 12
  assert any(c.islower() for c in generate_password())
  assert any(c.isupper() for c in generate_password())
  assert any(c.isdigit() for c in generate_password())
  assert any(c in string.punctuation for c in generate_password())
output: import random
  import string
  
  def generate_password(length=12):
      characters = string.ascii_letters + string.digits + string.punctuation
      password = [
          random.choice(string.ascii_lowercase),
          random.choice(string.ascii_uppercase),
          random.choice(string.digits),
          random.choice(string.punctuation)
      ]
      password += random.choices(characters, k=length-4)
      random.shuffle(password)
      return ''.join(password)