input: Write a python function to generate a random password containing lowercase, uppercase, and punctuation characters.
  assert len(generate_password()) == 10
  assert any(c.islower() for c in generate_password())
  assert any(c.isupper() 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=10):
      characters = string.ascii_letters + string.punctuation
      password = ''.join(random.choice(characters) for _ in range(length))
      # Ensure the password contains at least one lowercase, one uppercase, and one punctuation character
      while (not any(c.islower() for c in password) or
             not any(c.isupper() for c in password) or
             not any(c in string.punctuation for c in password)):
          password = ''.join(random.choice(characters) for _ in range(length))
      return password