filmov
tv
Python 3.7: Rfind String Method

Показать описание
Transcript:
The string it's being passed on so it's going to take a look at it example of all this so we're going to do is create a string a will represent the string and we're going to use Mississippi Mississippi just like that are fine and we want to find is.
So we'll go ahead and kick return and notice we are returned for I2.
It indicates show us the starting position of the string bean pass is an.
Starts at the 4th and index position can take a look at this 0 1 2 3 4.
So I start to the 4th and index position that's what it returned to us and take a look at an example if.
The argument is not found what happens a. Are fine fine fine.
Get return and we get returned at -1 his eyes he's not located in Mississippi unless you spell spelled the way I.
Take a look at another example we can also pass to optional arguments to start and stop index locations in the are fine string method so let's take a look at that are find like this and we'll go ahead and say I find I and we're going to say start V index position and end on the 9th but remember we're not technically letter ending on the night or ending on the 8th and Exposition to see head hitting your charm and we get returned 7 which eyes at was going to take a look up one two three four five six seven.
So that is the are fine string method in Python if you have any questions head over to master code. Online otherwise we'll see you in the next tutorial.
Комментарии