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