Slicing in Python | String Slicing in Python | Indexing and Slicing | Slicing in Python in Hindi

Sdílet
Vložit
  • čas přidán 22. 01. 2021
  • Slicing in Python | String Slicing in Python | Indexing and Slicing | Slicing in Python in Hindi
    This video is part of python tutorial for beginners in hindi. In this video,i have explained about slicing in python. Slicing is technique used to access substring in python. I have explained slicing with lot of examples.
    queries covered:-
    1) slicing in python
    2) string slicing in python
    3) python slicing
    3) what is string slicing?
    Hello guys,welcome to codeyug to build your computer science skills.Here,you will learn programming tutorials and computer science tutorials from basics to advanced.
    source code :-
    Thanks for watching this video
    Subscribe codeyug for more programming tutorials.
    bit.ly/3h3Bv0c
    About this channel:-
    This channel provides free tutorials on programming,coding,web development.There are programming tutorials which covers from basics to advanced absolutely in hindi.
    Our social links:-
    you tube:- bit.ly/3h3Bv0c
    instagram:- bit.ly/3mlspQu
    gmail :- shantanukejkar@gmail.com
    creator:-
    -----shantanu kejkar------
    #slicing #python #StringSlicing #string #slicing #python3 #codeyug #ShantanuKejkar #programming
  • Věda a technologie

Komentáře • 56

  • @krishnakamalgogoi9893
    @krishnakamalgogoi9893 Před 13 dny +1

    The is the best lecture on slicing, totally cleared all my doubts. Thank you so very much.

    • @Codeyug
      @Codeyug  Před 13 dny

      Thanks and follow czcams.com/play/PLI4OVrCFuY543naNBsCaRLrLSxI7MUOzZ.html&feature=shared

  • @vijaymehtaa
    @vijaymehtaa Před 2 lety +7

    Best lecture on slicing 🔥🔥🔥

    • @Codeyug
      @Codeyug  Před 2 lety +1

      Thank you so much..

  • @SibaniKumariSethi-jo1df

    Tq for clarify my doubts....

  • @Mr.daud786
    @Mr.daud786 Před 5 měsíci +1

    Bhi app ne to kmal kar dya
    Me Pakistani hn par app ke lecture me 8ndexing python understanding kar ke bht faida hwa he
    Agr c++ ,java pascal ho to wo bhi zroor seekha dn apni you tube channel par take sare lecture asani se note kar ke kuch achi programin kar skeg

    • @Codeyug
      @Codeyug  Před 5 měsíci

      Thank you for the comment!

  • @alphaizer07
    @alphaizer07 Před 2 lety +1

    KISI CHANNEL SE NAHI SAMJHE khali yehi channel hamko slicing samjha paaya.
    Thank you soo much 🔥🔥🔥🔥🔥🔥

    • @Codeyug
      @Codeyug  Před 2 lety +1

      Thank you.. You can follow our python tutorial... Lots of videos there.. Just check latest one.. You will find it usefull.

  • @riteshchand4904
    @riteshchand4904 Před rokem +3

    one of the best video for slicing . Hats off

    • @Codeyug
      @Codeyug  Před rokem

      Thank you.. Please share this video with others..

  • @aliahmed-vd2nt
    @aliahmed-vd2nt Před 9 měsíci

    Best lecture thanks

  • @pranjalkumar8721
    @pranjalkumar8721 Před rokem +2

    nyc one simple ppt but looks like animated!!

    • @Codeyug
      @Codeyug  Před rokem

      Thanks.. Please check playlists on my channel

  • @pankajrao6895
    @pankajrao6895 Před rokem +1

    This was the best on point explanation so far!!
    U got yourself a new subscriber.

    • @Codeyug
      @Codeyug  Před rokem

      Thanks and please check playlists...

    • @pankajrao6895
      @pankajrao6895 Před 11 měsíci

      @@Codeyug Yes i do and the playlist is very helpful!

  • @TheGhost-lr7vw
    @TheGhost-lr7vw Před 9 měsíci +1

    Thnks

  • @Shubhesh_Tiwari
    @Shubhesh_Tiwari Před rokem +1

    Well explained sir thank you ✅

    • @Codeyug
      @Codeyug  Před rokem

      Keep going.. Check courses in playlist section

  • @subhampatel758
    @subhampatel758 Před rokem +1

    🔥

  • @Pruthviraj07
    @Pruthviraj07 Před 7 měsíci +1

    Very nice explained sir
    Humari madam bhi fail hai aapke samne 😅❤

  • @divyadubey6679
    @divyadubey6679 Před 10 měsíci

    Could you please provide me def function based video along with question answer of python programming

  • @raj07shkjjgfss
    @raj07shkjjgfss Před rokem +1

    Nyc

  • @sandippal2857
    @sandippal2857 Před 6 měsíci +1

    So nice

  • @Think____different
    @Think____different Před rokem +1

    ❤️

  • @chetanpatil1269
    @chetanpatil1269 Před 3 lety +1

    I am beginner in django,it is very difficult to remember pip and other cmd commands for me,any solution?

  • @raj07shkjjgfss
    @raj07shkjjgfss Před rokem +1

    Java DSA ka bhi daliye sir

  • @aseerahnaf7713
    @aseerahnaf7713 Před 8 měsíci +1

    Thank you 😊🙏🙏😊

    • @Codeyug
      @Codeyug  Před 8 měsíci

      Most welcome 😊

  • @jagdishk9630
    @jagdishk9630 Před rokem +1

    well explained

  • @Cold_breeze7
    @Cold_breeze7 Před rokem +1

    Thank you bhai

    • @Codeyug
      @Codeyug  Před rokem +1

      You can follow playlists on this channel

  • @nandinigm6161
    @nandinigm6161 Před 3 lety +3

    Please explain me how the below slicing works?
    Name[5: : -1]
    Name[ :4 : -1]
    Name[-1: -5: -3]
    Name[0: -4 :-1]

    • @Codeyug
      @Codeyug  Před 3 lety +2

      You will get a video tomorrow...

  • @Shiva-zp7bj
    @Shiva-zp7bj Před 6 měsíci +3

    Homework answers:
    1.
    2.guy
    3.g
    4.

    • @Codeyug
      @Codeyug  Před 6 měsíci

      Well done!

    • @Shiva-zp7bj
      @Shiva-zp7bj Před 6 měsíci

      @@Codeyug Thank you sir ☺️ , after watching tons of videos , I only understood after watching yours

  • @saimanideep857
    @saimanideep857 Před rokem +2

    I have a doubt. If you run str_name[::-1] you get the string in reveresed format. But when i try str_name[0:4:-1] note that the length of string is 4, so I'm directly giving the start as 0 and end as the total string, and the index is -1. When I run this, it doesn't work! Why? Can anyone say please?

    • @Codeyug
      @Codeyug  Před rokem +1

      Please watch entire video carefully.. You will get the answer... Everything is covered

    • @saimanideep857
      @saimanideep857 Před rokem +2

      ​@@Codeyug I saw the video. But when I tried this code in my idle I got differect resutls for both of them. I'm unable to figure out what's wrong with it.
      Here is the code
      >>>a='hello'
      >>>a[::-1]
      >>>'olleh'
      >>>a[0:5:-1]
      >>>''
      Please test this in your pc. I'm not sure why is this happening. Thank you for replying.

    • @Codeyug
      @Codeyug  Před rokem

      @@saimanideep857 I got it. note this:- When you have negative step, default start value is -1 and not 0. It got missed in this video. But I covered it in other video, I will share the link... I need to search..

    • @Codeyug
      @Codeyug  Před rokem

      Check my latest short.. Your question is answered

    • @bidhanry9740
      @bidhanry9740 Před rokem

      @@saimanideep857
      so you are instructing python to start from 0 i.e 'h', and you need to move from left to right as step is -1, and keep running untill you reach index 5
      So, you were standing at 'h' and started moving left. However, you soon realized that you had been scammed because there was no index 5 in your moving direction. This made you angry, and you decided not to print anything🗿

  • @neerajthapak
    @neerajthapak Před rokem +1

    Gajak ka teaching skill h apka

    • @Codeyug
      @Codeyug  Před rokem

      Thanks and please share

  • @ALLISWELL609
    @ALLISWELL609 Před rokem +1

    Where is list slicing

    • @Codeyug
      @Codeyug  Před rokem +2

      list slicing is same as string slicing. You can apply this video on any collection in python.

  • @KaranSinghD-yj9ep
    @KaranSinghD-yj9ep Před rokem +2

    #slicing
    """slicing : slicing is used to access group of elements in string """
    name = "karan singh"
    print(name[0:4])
    print(name[:-4:-1])
    print(name[0:0])
    print(name[-1:-5:-3])
    #len by manul program
    num = input("Enter a string : ")
    counter = 0
    for i in num :
    counter+=1
    print(counter)
    #by len() func
    num = input("Enter a string : " )
    print("Entered string length is :", len(num))
    #string membership
    #Two membership operator : in , not in
    name = "karan singh"
    if "k" in name :
    print ("yes it is true")
    else:
    print("false")
    name = "karan singh"
    if " " in name :
    print ("yes it is true")
    else:
    print("false")

  • @KaranSinghD-yj9ep
    @KaranSinghD-yj9ep Před rokem +2

    #For fun try this 😂
    Run_this ="udohyheuvkomlri"
    print(Run_this[::-2])
    #Done