why it doesn't work? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
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 Respuesta
+ 1
Try this: print(f"{[i for i in range(3)]}")
12th Dec 2018, 12:25 PM
Diego
Diego - avatar