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

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • 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

КОМЕНТАРІ • 58

  • @krishnakamalgogoi9893
    @krishnakamalgogoi9893 2 місяці тому +2

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

    • @Codeyug
      @Codeyug  2 місяці тому

      Thanks and follow ua-cam.com/play/PLI4OVrCFuY543naNBsCaRLrLSxI7MUOzZ.html&feature=shared

  • @vijaymehtaa
    @vijaymehtaa 2 роки тому +7

    Best lecture on slicing 🔥🔥🔥

    • @Codeyug
      @Codeyug  2 роки тому +1

      Thank you so much..

  • @yt_abhishek07
    @yt_abhishek07 2 роки тому +1

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

    • @Codeyug
      @Codeyug  2 роки тому +1

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

  • @riteshchand4904
    @riteshchand4904 Рік тому +3

    one of the best video for slicing . Hats off

    • @Codeyug
      @Codeyug  Рік тому

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

  • @SibaniKumariSethi-jo1df
    @SibaniKumariSethi-jo1df 2 місяці тому +1

    Tq for clarify my doubts....

    • @Codeyug
      @Codeyug  2 місяці тому

      Thanks and please do share

  • @Mr.daud786
    @Mr.daud786 8 місяців тому +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  8 місяців тому

      Thank you for the comment!

  • @navinkarn
    @navinkarn 16 днів тому

    Thank you 😊 ❤

  • @pranjalkumar8721
    @pranjalkumar8721 Рік тому +2

    nyc one simple ppt but looks like animated!!

    • @Codeyug
      @Codeyug  Рік тому

      Thanks.. Please check playlists on my channel

  • @pankajrao6895
    @pankajrao6895 Рік тому +1

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

    • @Codeyug
      @Codeyug  Рік тому

      Thanks and please check playlists...

    • @pankajrao6895
      @pankajrao6895 Рік тому

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

  • @Shubhesh_Tiwari
    @Shubhesh_Tiwari Рік тому +1

    Well explained sir thank you ✅

    • @Codeyug
      @Codeyug  Рік тому

      Keep going.. Check courses in playlist section

  • @nandinigm6161
    @nandinigm6161 3 роки тому +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  3 роки тому +2

      You will get a video tomorrow...

  • @aseerahnaf7713
    @aseerahnaf7713 11 місяців тому +1

    Thank you 😊🙏🙏😊

    • @Codeyug
      @Codeyug  11 місяців тому

      Most welcome 😊

  • @aliahmed-vd2nt
    @aliahmed-vd2nt 11 місяців тому

    Best lecture thanks

  • @TheGhost-lr7vw
    @TheGhost-lr7vw 11 місяців тому +1

    Thnks

  • @divyadubey6679
    @divyadubey6679 Рік тому

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

  • @raj07shkjjgfss
    @raj07shkjjgfss Рік тому +1

    Nyc

  • @Pruthviraj07
    @Pruthviraj07 10 місяців тому +1

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

  • @sandippal2857
    @sandippal2857 9 місяців тому +1

    So nice

    • @Codeyug
      @Codeyug  8 місяців тому

      Please do share

  • @Aalekh_Chaudhary
    @Aalekh_Chaudhary Рік тому +1

    Thank you bhai

    • @Codeyug
      @Codeyug  Рік тому +1

      You can follow playlists on this channel

  • @chetanpatil1269
    @chetanpatil1269 3 роки тому +1

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

  • @jagdishk9630
    @jagdishk9630 Рік тому +1

    well explained

  • @subhampatel758
    @subhampatel758 Рік тому +1

    🔥

  • @raj07shkjjgfss
    @raj07shkjjgfss Рік тому +1

    Java DSA ka bhi daliye sir

  • @Shiva-zp7bj
    @Shiva-zp7bj 9 місяців тому +3

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

    • @Codeyug
      @Codeyug  9 місяців тому

      Well done!

    • @Shiva-zp7bj
      @Shiva-zp7bj 9 місяців тому

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

  • @saimanideep857
    @saimanideep857 Рік тому +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  Рік тому +1

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

    • @saimanideep857
      @saimanideep857 Рік тому +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  Рік тому

      @@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  Рік тому

      Check my latest short.. Your question is answered

    • @bidhanry9740
      @bidhanry9740 Рік тому

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

  • @Think____different
    @Think____different Рік тому +1

    ❤️

  • @neerajthapak
    @neerajthapak Рік тому +1

    Gajak ka teaching skill h apka

    • @Codeyug
      @Codeyug  Рік тому

      Thanks and please share

  • @KaranSinghD-yj9ep
    @KaranSinghD-yj9ep 2 роки тому +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")

  • @ALLISWELL609
    @ALLISWELL609 Рік тому +1

    Where is list slicing

    • @Codeyug
      @Codeyug  Рік тому +2

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

  • @KaranSinghD-yj9ep
    @KaranSinghD-yj9ep 2 роки тому +2

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