English subtitles

← Find 1 - Intro to Computer Science

Get Embed Code
8 Languages

Showing Revision 7 created 05/25/2016 by Udacity Robot.

  1. [Dave] Question 7, test if you understand how to use the find method.
  2. Assume that the variable text holds a string.
  3. Your goal is to write some Python code that prints out the position
  4. of the first occurrence of hoo, H-O-O,
  5. in the value of text or -1 if the string hoo
  6. does not occur at all in text.