adplus-dvertising
frame-decoration

Question

What is the output of the code shown?
 '%(qty)d more %(food)s' %{'qty':1, 'food': 'spam'}

a.

Error

b.

No output

c.

‘1 more foods’

d.

‘1 more spam’

Posted under Python

Answer: (d).‘1 more spam’

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown?