Basic Exercises on the String.find()
Python method.
#What is String.find()
?
String.Find()
is a function to find something [In a certain position] in a string of text. Each character - including space is turned into a number.
Example:
"Alan Turing".find("N", 4)
The "N" is what we are looking for, and the "4" is where we start.
Alan Turing
012345678910
Start at 0
and count.
So the answer would be:
9
Additonally,
The Numerical number is option for example:
"Ada Lovelace".find(" ")
This is asking to find the first Space.
Again - Start at 0
Ada Lovelace 0123
So - The answer to this would be:
3