input: Write a function to generate a random password using a set of letters, numbers, and characters. If no input is provided, the function should generate a password of 8 characters long.
  assert generate_password()== "a1B2C3D4"
  assert generate_password()== "E5F6G7H8"
  assert generate_password()== "I9J0K#L$"
  assert generate_password()== "M%N^O&P*"
  assert generate_password()== "Q!R(S)T?"
output: import random
  import string
  
  def generate_password(length=8):
      characters = string.ascii_letters + string.digits + string.punctuation
      return ''.join(random.choice(characters) for _ in range(length))