Examveda

What will be the output of the following Python code?
l=list('HELLO')
'first={0[0]}, third={0[2]}'.format(l)

A. 'first=H, third=L'

B. 'first=0, third=2'

C. Error

D. 'first=0, third=L'

Answer: Option A


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators