How to use for loop inside f-string? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to use for loop inside f-string?

#take this case : names = ['Bob', 'Alice', 'Guido'] for index,value in enumerate(names): print(f"{index}:{value}")

7th Dec 2018, 12:44 PM
Tincture
1 Answer
+ 1
What is the question? Your case looks like the answer to your question.
7th Dec 2018, 1:17 PM
HonFu
HonFu - avatar