Vidyalelo
Python · Q18

Formatting and Decorators

Programming · Python · question 18

Q18

What will be the output of the following Python code? 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']"
Answer
D.
Junk value

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board