why it doesn't work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answer
+ 1
Try this: print(f"{[i for i in range(3)]}")
12th Dec 2018, 12:25 PM
Diego
Diego - avatar