String Slicing using a Negative Index || Start : Stop : Step Index || What? How? || Python Tutorial

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 39

  • @Mo-ip4mm
    @Mo-ip4mm 4 месяца назад +2

    This is by far one of the most helpfull things I've ever watched in yt. Thank you so much!

  • @Luffytoro
    @Luffytoro 11 месяцев назад +3

    Please continue this series!!

  • @asmaaadel6553
    @asmaaadel6553 Год назад

    the best python tutorial on youtube💓💗

  • @ishurao5800
    @ishurao5800 10 месяцев назад

    Good editing & explained several scenarios, thanks!!

  • @kennethstephani692
    @kennethstephani692 9 месяцев назад

    Great video!

  • @niteshnayak940
    @niteshnayak940 3 месяца назад +1

    great....!!!!!

  • @radhakrishnana8235
    @radhakrishnana8235 8 месяцев назад +2

    At 4:35 as stop index is mentioned as 13 answer should be "no" right instead of "noi"

  • @AradhanaGupta-p1d
    @AradhanaGupta-p1d Год назад

    Not even a single doubt thank to you mam
    After too much video's i reach here and stops here❤❤❤

  • @sri.teju.4396
    @sri.teju.4396 Год назад

    Very good explanation and nice editing

  • @abhilashpandey1352
    @abhilashpandey1352 4 месяца назад

    @4:46 - How come the C index as 8 ?? L-0 , e-1, a-2,r-3 ,space - 8 and C-9

  • @fimzy_official
    @fimzy_official Год назад

    Thanks a lot! It was very helpful

  • @Mythri333
    @Mythri333 11 месяцев назад

    Thank you so much 😊

  • @santoshdhabekar2576
    @santoshdhabekar2576 Год назад +1

    Could you please try to complete the statistics

  • @hedaboss488
    @hedaboss488 Год назад

    Thank you so much, you explain so much better than my teachers!

  • @abdullahjama8404
    @abdullahjama8404 2 года назад

    very helpful clear and easy haven't found any resources regarding that, thanks

  • @rajrajyan6018
    @rajrajyan6018 2 года назад +2

    Crystal clear explanation 👍🙂

  • @md9936
    @md9936 2 года назад +1

    Thank you very much for sharing your knowledge, the video was very clear and objective directly to the topic, good video!.

  • @vaibhavkothawale1466
    @vaibhavkothawale1466 2 года назад

    Great video, simplest explanation.

  • @mackensonreginaldmichel399
    @mackensonreginaldmichel399 Год назад

    Perfect Tuto

  • @youvin4907
    @youvin4907 4 месяца назад

    👍

  • @MRBeen-fz1ew
    @MRBeen-fz1ew 2 года назад

    good clear in my doubt

  • @sanjitbansal7955
    @sanjitbansal7955 Год назад +1

    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

  • @siioiheh
    @siioiheh Год назад

    What is the output of the mystring[0:-4]? Is it an error? why it still valid? Wouldn’t the direction contradict itself?

    • @learningchampion
      @learningchampion  Год назад +1

      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'.

  • @gomer3894
    @gomer3894 Год назад

    thank you a lot

  • @roughmath3799
    @roughmath3799 2 года назад

    Very good, Excellent

  • @lakshya6499
    @lakshya6499 5 месяцев назад

    b = "Hello, World!"
    print(b[-2:-5:-4]) can you explain this

    • @Ayush_m1
      @Ayush_m1 2 месяца назад

      !r will be the output from my understanding

  • @sketchX_2010_
    @sketchX_2010_ Год назад

    Thank you 🙏🏻

  • @mackensonreginaldmichel399
    @mackensonreginaldmichel399 Год назад +2

    With this video, I'm done struggling to understand list and String slicing

  • @sandeshchandravanshi8455
    @sandeshchandravanshi8455 2 месяца назад

    🥵🥵

  • @medicalkick6940
    @medicalkick6940 Год назад

    Thank you

  • @osabeaa
    @osabeaa 11 месяцев назад

    scenario 3 will be blank

  • @hamsasingaravelu6129
    @hamsasingaravelu6129 Год назад

    Upload more video it would be helpful for learning

  • @kennykamei2953
    @kennykamei2953 2 года назад +1

    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.

    • @learningchampion
      @learningchampion  2 года назад +1

      Yes. Then that case would not be slicing using a negative index. The same example is explained in string slicing (ruclips.net/video/eH6GCyHnWTA/видео.html) video. You can watch that video for more clarity.