Pergunta de entrevista da empresa Qualtrics

Write code to traverse a List of Objects; The Object could be a nested List of Objects, or a String. Given a string, remove the first instance of it from the list.