I am a newbie to Python and have come across the following example in my book that is not explained very well. Here is my print out from the interpreter:
If we want to print from the back-end of the string we can go for negative indexing. Indexing starts from -1.
Example : s = 'hello world'
s[-11:-1] = 'hello worl'
s[-1:-11] = '' // beginning value should be lower(i.e., in this case -1 greater than -11) if it is greater it won't print anything.