Pregunta de entrevista de Block

Basic SQL questions, nested list and tuple manipulation in Python