explain negative indexing [1::-3],[1::-2],[1::-5],
What is the output of this code? S= "Welcome" print(s[2::-4])
You could yourself test and play with this code in SL playground. In this way you can better understand how that works.
the index value of -1 gives the last element, and -2 gives the second last element of an array. The negative indexing starts from where the array ends. This means that the last element of the array is the first element in the negative indexing which is -1.
Please Correct Me if iam wrong
yes you are correct but -4 means you can count form last number to forth
I didn't get