String formatting | Sololearn: Learn to code for FREE!

+1

String formatting

What's wrong https://code.sololearn.com/cFVW27tSt1LP/?ref=app

4/20/2021 2:36:14 PM

Akash Prasad

6 Answers

New Answer

+10

your version was: list=["jai","maa","bharati"] name="slog:"{0},{1},{2}.formate(list[0],list[1],list[2]) print(name) 1.) The closing quotation mark what you have after slog: has to be positioned after {2} 2.) the "format" keyword has to be written without the "e" at the end 3.) you should not name a list "list", because "list" is a reaerved keyword in Python. it is used to create a list from an iterable

+7

#corrected list=["jai","maa","bharati"] name="slog: {0},{1},{2}".format(list[0],list[1],list[2]) print(name)

+1

Can you please point out my mistake

+1

Thanks bro

0

Yoo what the hell you can comment on stuff

0

Please help me to learn coding