Where is it?
It's actually really common in programming to have a String like
- "Hello Students!"
and need to know WHERE the "S" is in that String. [The answer is 6 since it is the SEVENTH character in the string but we start counting at zero].
Write a Python function that conforms to the following:
- Function name
- findPosition()
- Parameters
- A "long" String consisting of multiple characters
- A String of a single character that you are looking for.
- Return value
- The index of the position of the FIRST occurrence of the character being asked about.
- or
- -1 if it doesn't exist
- Examples