Pregunta de entrevista de IBM

Programming question on python and SQL question