adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
l=list('HELLO')
p=l[0], l[-1], l[1:3]
'a={0}, b={1}, c={2}'.format(*p)

a.

Error

b.

“a=’H’, b=’O’, c=(E, L)”

c.

“a=H, b=O, c=[‘E’, ‘L’]”

d.

Junk value

Answer: (c).“a=H, b=O, c=[‘E’, ‘L’]”

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?