input: Write a python function to generate a random password of specified length containing letters, digits, and punctuation.
  assert len(generate_password(8)) == 8
  assert len(generate_password(12)) == 12
  assert any(c.isdigit() for c in generate_password(15))
  assert any(c.isalpha() for c in generate_password(15))
  assert any(c in string.punctuation for c in generate_password(15))
output: import string
  import random
  
  def generate_password(length):
      if length < 1:
          return ""
      
      all_chars = string.ascii_letters + string.digits + string.punctuation
      password = ''.join(random.choice(all_chars) for _ in range(length))
      
      return password