python 3.x - Please provide an example of the .format() function where the index field is left blank -


alright bit confused. i'm learning program says index fields .format() method can left blank , if case parameters filled in slots in left right fashion. have tried find answers question haven't found , appreciate if clear me understandable examples , explanations of how use .format() method without index values.

you might this:

print("the value of {} {}".format("foo", 5)) 

this equivalent to

print("the value of {0} {1}".format("foo", 5)) 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -