At 5.53 I think default stop index would be 1 index ahead of first index towards the left side(ie. out of range) otherwise output won't include value of first index...besides very nice explanation.....for eg a='LEARNING CHAMPIONS' print(len(a)) print(a[::-1]) print(a[-1:-19:-1]) print(a[17:-19:-1]) output for all 3-SNOIPMAHC GNINRAEL
If mystring="Learning Champion" and you type mystring[0:-4] then the output will be 'Learning Cham'. This is because the direction of movement of pointer is from left to right and the stop index is -4 which is 'p'.
Buddy, when slicing a negative index the negative start index does not always have to be greater than the negative stop index. If the negative start index is smaller than the negative stop index python will simply run the string from left to right. Also you don't have to add a step index in such a case.
Yes. Then that case would not be slicing using a negative index. The same example is explained in string slicing (th-cam.com/video/eH6GCyHnWTA/w-d-xo.html) video. You can watch that video for more clarity.
Please continue this series!!
This is by far one of the most helpfull things I've ever watched in yt. Thank you so much!
the best python tutorial on youtube💓💗
Not even a single doubt thank to you mam
After too much video's i reach here and stops here❤❤❤
Good editing & explained several scenarios, thanks!!
great....!!!!!
Great video!
Very good explanation and nice editing
Thanks a lot! It was very helpful
Crystal clear explanation 👍🙂
very helpful clear and easy haven't found any resources regarding that, thanks
Thank you so much 😊
Thank you so much, you explain so much better than my teachers!
Thank you very much for sharing your knowledge, the video was very clear and objective directly to the topic, good video!.
At 4:35 as stop index is mentioned as 13 answer should be "no" right instead of "noi"
Do we include the space in the slicing?
Great video, simplest explanation.
@4:46 - How come the C index as 8 ?? L-0 , e-1, a-2,r-3 ,space - 8 and C-9
Perfect Tuto
Could you please try to complete the statistics
good clear in my doubt
👍
Very good, Excellent
Thank you 🙏🏻
thank you a lot
At 5.53 I think default stop index would be 1 index ahead of first index towards the left side(ie. out of range) otherwise output won't include value of first index...besides very nice explanation.....for eg
a='LEARNING CHAMPIONS'
print(len(a))
print(a[::-1])
print(a[-1:-19:-1])
print(a[17:-19:-1]) output for all 3-SNOIPMAHC GNINRAEL
🥵🥵
What is the output of the mystring[0:-4]? Is it an error? why it still valid? Wouldn’t the direction contradict itself?
If mystring="Learning Champion" and you type mystring[0:-4] then the output will be 'Learning Cham'. This is because the direction of movement of pointer is from left to right and the stop index is -4 which is 'p'.
With this video, I'm done struggling to understand list and String slicing
Thank you
Upload more video it would be helpful for learning
b = "Hello, World!"
print(b[-2:-5:-4]) can you explain this
!r will be the output from my understanding
scenario 3 will be blank
Buddy, when slicing a negative index the negative start index does not always have to be greater than the negative stop index. If the negative start index is smaller than the negative stop index python will simply run the string from left to right. Also you don't have to add a step index in such a case.
Yes. Then that case would not be slicing using a negative index. The same example is explained in string slicing (th-cam.com/video/eH6GCyHnWTA/w-d-xo.html) video. You can watch that video for more clarity.