Exam Foundations-of-Programming-Python Topic 1 Question 40 Discussion
Actual exam question for WGU's Foundations-of-Programming-Python exam
Question #: 40
Topic #: 1
Question #: 40
Topic #: 1
Which index position is returned when the string method .find( ' python ' ) is applied to the string ' learning python programming ' ?
Suggested Answer: B Vote an answer
The .find() method returns the lowest index where the searched substring is found.
Example:
" learning python programming " .find( " python " )
Output:
9
Indexing starts at 0 in Python. In the string ' learning python programming ' , the word ' python ' begins at index 9. Python's built-in types documentation describes str.find() as returning the lowest index where the substring is found.
Therefore, the correct answer isB. 9.
Example:
" learning python programming " .find( " python " )
Output:
9
Indexing starts at 0 in Python. In the string ' learning python programming ' , the word ' python ' begins at index 9. Python's built-in types documentation describes str.find() as returning the lowest index where the substring is found.
Therefore, the correct answer isB. 9.
by Marina at Aug 14, 2026, 08:03 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).