In the paese method that is defined

what is the use of [-2] , in the page=response.url.split("/")[-2]

Hey @sankalparora5, basically url = ''http://quotes.toscrape.com/page/1/" and we need to access number 1 so first we split on the basis of ‘/’. This will return a list of strings, after splitting on ‘/’, now we need to access ‘1’, which will be second last element in the list, so we use [-2].

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.