Q. What will be the output of following python code?

Code:
print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
  • (A) Hello foo and bin
  • (B) Hello (‘foo’, ‘bin’) and (‘foo’, ‘bin’)
  • (C) Error
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) Hello foo and bin

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
356
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Parvesh Kanani
Publisher
πŸ“ˆ
81%
Success Rate