why it doesn't work? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

why it doesn't work?

print(f"{i for i in range(3)}") but print(f"{list(range(3))}") works

12th Dec 2018, 11:27 AM
Tincture
1 Antwort
+ 1
Try this: print(f"{[i for i in range(3)]}")
12th Dec 2018, 12:25 PM
Diego
Diego - avatar