Sail E0 Webinar
Question
The output of the code shown below is:s='{0}, {1}, and {2}'s.format('hello', 'good', 'morning')
Options:
A .  'hello good and morning'
B .  'hello, good, morning'
C .  'hello, good, and morning'
D .  Error
Answer: Option C


Within the subject string, curly braces designate substitution targets and arguments to be inserted either by position or keyword. Hence the output of the code shown above:'hello, good,and morning'.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers