input: Write a function to generate a random password. The function should generate a string of 8 characters consisting of numbers, letters, and special characters.
  assert generate_password()!=None
  assert len(generate_password())==8
  assert any(c.isdigit() for c in generate_password())==True
  assert any(c.isalpha() for c in generate_password())==True
  assert any(c in string.punctuation for c in generate_password())==True
output: import random
  import string
  
  def generate_password():
      chars = string.ascii_letters + string.digits + string.punctuation
      return ''.join(random.choice(chars) for _ in range(8))