What will be the output of the following Python code? print(“Hello {0[0]} and {0[1]}”.format((‘foo’, ‘bin’)))

Questions & AnswersCategory: Programming LanguageWhat will be the output of the following Python code? print(“Hello {0[0]} and {0[1]}”.format((‘foo’, ‘bin’)))
Geek Boy Staff asked 2 years ago

What will be the output of the following Python code?

print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))

a. Hello (‘foo’
‘bin’. and (‘foo’
‘bin’.
b. Error
c. Hello foo and bin
d. None of the mentioned