A

Admin • 833.24K Points
Coach

Q. What is the output of the following?

Code:
print('Python'.find('th'))
  • (A) 2
  • (B) 3
  • (C) -1
  • (D) Error
  • Correct Answer - Option(A)
  • Views: 24
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

find() returns the index of the first occurrence of the substring.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.