foreign we have understood l-strip and R strip methods now in this presentation we will continue our discussion on string Methods and we will understand few more methods so without any further delay let's get started the first topic of this presentation is split method the second topic is our split method and after discussing these two topics we will then move on to the homework problem of this presentation so let's get started with the first topic that is split method so what is the split method split method is used to split a string into a list so split method divides a string into sub strings and store them as individual items of the list the syntax of split method looks like this split method is applied on a string with this dot operator to the split method we can provide two arguments the first argument is separator and the second argument is Max split the separator tells the position at which the split should occur by default any white space character is a separator on the other hand Max split tells the maximum number of splits that are allowed by default Max split is -1 which means that there is no limit on the number of splits now let's understand the functionality of split method with the help of an example for this we need to open our Command Prompt and we need to activate the python interactive shell now we are ready to type in the commands here let's type the string first Hello exclamation mark dollar I dollar M dollar Just Breathe after the string we will now type dot split dollar Max split equal to 2. so to the split method we have passed two arguments first is the separated dollar and second is Max split equal to 2. the first argument is telling us the position at which the separation should occur which is dollar and second argument is telling us that there are maximum two splits allowed no more than two splits are allowed now let's see what happens when we perform the split operation split method always starts reading the string from the left so it will read the string from the left after reading these characters it will encounter dollar symbol as dollar is the separator provided here therefore split method will stop at this point and will take the string before it and store it as the first item of the list so Hello exclamation mark will become the first item of the list after dollar it encounters I and then it encounters dollar which means at this point also split method has to stop and it needs to take the string before it which is just I so I will be stored as the second item of the list I hope up to this point everything is clear after this dollar split method encounters these two characters A and M and then it encounters another dollar symbol but this time it will not stop what is the reason behind this the reason is the second argument provided to the split method split method has received Max split equal to 2 which means that the maximum number of splits that are allowed is 2. already two splits are performed at this position first split has been performed and at this position the second split has been performed this is the reason why we got these two strings as the two items of the list now after this this split will not be performed as Max split value is 2 split method has to consider this entire string as the third item of the list it will not stop here so this split will not be performed hence am dollar just preet will become the third item of the list I hope this entire idea is completely clear so now if we hit enter we will get this list with three items hello I and am dollar Just Breathe now you can imagine if Max split was 3 in place of 2 then the split will be performed at this position also but it is not the case Max split is 2. now let's move on to the next example this time we will type this string hello I am just breathe and then dot split and this time we are not providing any arguments to the split method so split method receives nothing this means that separator and Max split will take their default values by default any white space character is a separator and by default minus 1 is the value of the max split which means that there is no limit on the number of splits hence this means that we will get four items in the list the first item will be Hello exclamation mark the second item will be I the third item will be am and the fourth item will be just breathe these operations will occur at these positions I hope the concept is clear now if we hit enter we will get this list with four items so now as we have understood split method let's move on to the next method which is our split method let's understand what is the meaning of r split and how R split works our split method is used to split the string from the right it will not split the string from the left but from the right this is the reason why it is called R split R stands for right so our split method is used to split the string from the right and the syntax of our split method looks like this our split method is also applied on a string and to the r split method we can provide two arguments the first argument is the separator and the second argument is the max split now let's understand the functionality of our split with the help of an example for this we need to again open our Command Prompt and we need to activate the python interactive shell now together let's type this command Hello exclamation mark dollar I dollar am dollar just breathe dot R split and to the r split we will provide these two arguments dollar and Max split equal to 2. the same example but this time we have R split in place of split now the difference between R split and split is that split method always starts reading the string from left on the other hand our split starts reading the string from the right so our split method will read the string from the right not from the left so it will start reading from this character the separator is dollar and Max split is 2. our split method will start reading the string from here so it will read this string and it will stop at this dollar symbol because separator is dollar therefore it will take this string just breathe and it will put the string as the last item of the list note that our split method will not make this as the first item of the list our split method will make this string the last item of the list as this string appears last in this string one time the separation is done now after this R split will continue reading the characters it will read these two characters and it will stop at this point and therefore it will take this string and make it the second last item of the list as two splits are done therefore our split will take this substring and make it the first item of the list now if we hit enter we will get this list this list is different from the list that we got in case of split method in case of split method we got Hello exclamation mark as the first item the second item was I and the third item was am dollar just breathe but this time we are getting Hello exclamation mark dollar I as the first item the second item that we got is am and the third item is just preet I hope the concept of R split is completely clear from this example now let's move on to the homework problem of this presentation what is the output of the following code so the code is available in front of you you need to determine the output of this code the method is R split and to this method no argument is provided your job is to determine the output of this code now as we have seen this homework problem we are done with this entire lecture we have understood what is split method we have understood what is our split method and we have seen how our split method is different from split method as it always reads A String from right and we saw the homework problem of this presentation as well okay friends this is it for now thank you for watching this presentation I will see you in the next one [Music] [Applause] thank you