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

Поделиться
HTML-код
  • Опубликовано: 11 ноя 2024
  • This video will discuss WHAT and HOW of String Slicing using a Negative Index with fun animation and examples.
    Please subscribe to our channel for more such videos - / @learningchampion
    ••••••••••••••••••••••••••••••••••••••••­­­•••••••••••
    Video Covers:
    -- Types of Indexes
    -- What is a Negative Index?
    -- How are strings indexed using both Positive and Negative Indexes?
    -- How are Strings sliced using a Negative Index?
    -- Scenario 1: No Step Size while slicing using a Negative Index
    -- Scenario 2: String Slicing using a combination of Positive and Negative Index
    -- Scenario 3: Slicing using the Positive Indexes and a Negative Step Size
    -- Scenario 4: How to Reverse a String?
    ••••••••••••••••••••••••••••••••••••••••­­­•••••••••••
    String Indexing | Why? How? || Python Tutorial for Beginners - • String Indexing || Why...
    String Slicing || Start : Stop : Step Index || What? How? || Python Tutorial for Beginners - • String Slicing || Star...
    Watch the full Python Beginner Series here:
    • Python Basics & Coding...
    ••••••••••••••••••••••••••••••••••••••••­­­•••••••••••
    Useful Links:
    -- Python Programming: A Beginner's Guide to Learn Python - amzn.to/465sgau
    -- Automate the Boring Stuff with Python, 2: Practical Programming for Total Beginners - amzn.to/3t52jsP
    -- Python All-in-One for Dummies - amzn.to/3Pvcqi9
    -- Python: The Complete Reference - amzn.to/3rgw5KR
    -- Data Science From Scratch - amzn.to/3LyCkAz
    -- Python Data Science Handbook: Essential Tools for Working with Data - amzn.to/3ZvUKrt
    -- Practical Statistics for Data Scientists - amzn.to/3t6UuD7
    -- Apple 2023 MacBook Air - amzn.to/3ZvxR7o
    -- Apple 2022 MacBook Pro - amzn.to/3ENhBVV
    -- Acer Nitro V Gaming Laptop - amzn.to/3PBFW66
    -- HP USB Wireless Mouse - amzn.to/46pwWaD
    -- Lenovo Wireless Compact Mouse - amzn.to/456ijIe
    -- Portronics Wireless Optical Mouse - amzn.to/3t6UL97
    -- Mouse Pad Large/Desk Mat - amzn.to/3EQg3dG
    -- Gel Mouse pad with Wrist Rest - amzn.to/3EWcgvb
    -- Vegan Leather Mouse Pad with Wrist Rest - amzn.to/3EPyK13
    -- uni-ball Eye 0.7mm Roller Ball Pen - amzn.to/3LAHQCJ
    -- Reynolds TRIMAX - amzn.to/46l1V7L
    -- Pentonic Ball Pen - amzn.to/3ZvhZl7
    -- Hauser Sonic 0.55mm Gel Pen - amzn.to/3ZvynlQ
    -- STABILO Fineliner Pen point - amzn.to/3PmtvuE
    -- To Do List Acrylic Board for Desk - amzn.to/3Lzz3AT
    -- 2023 Undated Daily Planner/Journal/Schedule/To-Do List/Productivity Tracker/ Gratitude Journal/Mood Tracker for Wellness - amzn.to/3PQ9iin
    -- Daily Planner and Journal - amzn.to/46oKnIe
    -- To Do List Daily Planner Notepad A4 - amzn.to/3PuvIV1
    -- Simple Planner: 12 Months Undated - amzn.to/46oRakS
    -- Journal Diary - amzn.to/3PwIoui
    -- Soft Cover 6 Subject Spiral Binding Notebook, Single Line - amzn.to/3RzwHpC
    -- Hard Bound Notebook with Elastic Band Closure & Pen Loop - amzn.to/3rh9yxr
    -- 5 Subject Notebook - amzn.to/3ENzG5U
    -- Classic Notebook Checkered - amzn.to/3POxVff
    -- Sticky Book Tabs Colorful Annotation Tabs - amzn.to/3POZSU4
    -- Transparent Sticky Notes - amzn.to/3ZsqT2U
    -- Pastel Sticky Notes Pad - amzn.to/3Zr9jfO
    -- Post-it Super Sticky Notes - amzn.to/3PMRq7Z
    ••••••••••••••••••••••••••••••••••••••••­­­•••••••••••
    Music Used :
    ------------------------------
    Tobu - Candyland [NCS Release] : • Video
    ------------------------------
    ••••••••••••••••••••••••••••••••••••••••­­­•••••••••••
    Keywords :
    Machine Learning , Machine Learning Python , Machine Learning Tutorials , ML , Python Tutorial , Machine Learning with Python , Machine Learning tutorial for beginners , How to start Machine Learning , Basics of Machine Learning , ml , Machine learning with Python , Tips and tricks in Python , python programming , python tutorials for Beginners, variables and data types in Python , is python case sensitive , computer programming , How to earn more money , Python Strings , immutable , strings are array , source code , GitHub , immutable object , strings in python, python tutorials for beginners , python strings array , python string advanced , python string literals , string indexing , negative index , reverse index , indexing notation , string indexing out of range error , reverse a string in Python , String operations in Python , Python string programs , string concatenation in python , string functions in Python , python strings , python string code , python code , string slicing in python , string positive index , string negative index , how to reverse a string , reverse string in python , how to be rich , Make money using Python , make money using coding

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

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

    Please continue this series!!

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

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

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

    the best python tutorial on youtube💓💗

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

    Good editing & explained several scenarios, thanks!!

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

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

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

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

  • @sri.teju.4396
    @sri.teju.4396 10 месяцев назад

    Very good explanation and nice editing

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

    Great video!

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

    Thank you so much 😊

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

    Thanks a lot! It was very helpful

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

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

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

    👍

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

    Crystal clear explanation 👍🙂

  • @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!

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

    great....!!!!!

  • @mackensonreginaldmichel399
    @mackensonreginaldmichel399 11 месяцев назад +2

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

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

    Great video, simplest 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!.

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

    good clear in my doubt

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

    Perfect Tuto

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

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

  • @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

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

    thank you a lot

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

    Very good, Excellent

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

    Thank you 🙏🏻

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

    Thank you

  • @sandeshchandravanshi8455
    @sandeshchandravanshi8455 26 дней назад

    🥵🥵

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

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

    • @Ayush_m1
      @Ayush_m1 Месяц назад

      !r will be the output from my understanding

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

    scenario 3 will be blank

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

    Upload more video it would be helpful for learning

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

  • @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.