Vai al contenuto principale
๐Ÿ”’ Modalitร  anteprima. Le prime quindici lezioni di Foundations sono gratuite; questa รจ Pro. Avvia un trial di 7 giorni per sbloccare l'editor, i suggerimenti AI e il resto del programma. Carta richiesta, disdici in qualsiasi momento dalla Dashboard.Avvia trial di 7 giorni โ†’
โšก
โ† Corsiโ€บPython FoundationsModulo 8 ยท Python moderno e capstoneโ€บrendimento da โ€” delegazione del generatorewrite159 / 174
+100 XP
Compito๐ŸŒ shown in EN
๐Ÿ“ **Question:** Define \`flatten(items)\` that yields items from nested lists at any depth, using \`yield from\` for recursion. Run on \`[1, [2, [3, 4]], 5]\` and print each item on its own line.\nExpected:\n1\n2\n3\n4\n5 ๐Ÿ“‹ Pick the right answer. ๐Ÿ’ก **Hint:** Re-read the theory above if unsure.
โœ๏ธ Scrivi il tuo codice qui
๐Ÿ
Caricamento Python...
Download una tantum (~1 MB). Poi รจ istantaneo.
๐Ÿ“Š Risultato
Premi Esegui per vedere il risultato...