input: 
  import random
  import string
  
  def generate_password() -> str:
      """ Generates a random password consisting of 8 characters (numbers, letters and special characters).
      >>> generate_password()
      'A1b2C3d@'
      """
      password_characters = string.ascii_letters + string.digits + string.punctuation
      password = ''.join(random.choice(password_characters) for i in range(8))
      return password
  
  print(generate_password())
  
output:     password_characters = string.ascii_letters + string.digits + string.punctuation
      password = ''.join(random.choice(password_characters) for i in range(8))
      return password