adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
 D=dict(p='compsci', q='bits')
'{p}{q}'.format(**D)

a.

Error

b.

compscibits

c.

compsci bits

d.

{‘compsci’, ‘bits’}

Posted under Python

Answer: (b).compscibits

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 below?