Examveda

What will be the output of the following Python code snippet?
'%(qty)d more %(food)s' %{'qty':1, 'food': 'spam'}

A. Error

B. No output

C. '1 more foods'

D. '1 more spam'

Answer: Option D


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators