Sail E0 Webinar
Question
What is the output of the code shown below?'The {} side {1} {2}'.format('bright', 'of', 'life')
Options:
A .  Error
B .  'The bright side of life'
C .  'The {bright} side {of} {life}'
D .  No output
Answer: Option A


The code shown above results in an error. This is because we have switched from automatic field numbering to manual field numbering, that is, from {} to {1}. Hence this code results in an error.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers