What will be the output of the following Python statement?

print(list(enumerate(["A", "B"])))
                        

Options

  • A. [(1, "A"), (2, "B")]
  • B. [(0, "A"), (1, "B")]
  • C. ["A", "B"]
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. [(0, "A"), (1, "B")]

Detailed Explanation

Explanation: enumerate() returns index-value pairs and starts indexing from 0 by default.