πŸ“Š Python
Q. What is the output of the following?
Code:
print('Python'.find('th'))
  • (A) 2
  • (B) 3
  • (C) -1
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 2

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

Explanation by: Mr. Dubey
find() returns the index of the first occurrence of the substring.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
68
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate