Pergunta de entrevista da empresa Syntronic

Pointless question like fixing the code below by changing the order only: state will be "not connected" or "connected" if "connected" in state: raise TestPassed("") else: raise TestFailed("")

Resposta da entrevista

Sigiloso

6 de abr. de 2025

The correct answer is : if state in "connected": raise TestPassed("") else: raise TestFailed("") Yup, I know normal person would write the code like if state == "connected" rather than this