What will be the output of the following Python statement?

print("banana".find("na"))
                        

Options

  • A. 1
  • B. 2
  • C. 3
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. 2

Detailed Explanation

Explanation: find() returns the index of the first occurrence. The first "na" starts at index 2.