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
The is the best lecture on slicing, totally cleared all my doubts. Thank you so very much.
Thanks and follow ua-cam.com/play/PLI4OVrCFuY543naNBsCaRLrLSxI7MUOzZ.html&feature=shared
Best lecture on slicing 🔥🔥🔥
Thank you so much..
KISI CHANNEL SE NAHI SAMJHE khali yehi channel hamko slicing samjha paaya.
Thank you soo much 🔥🔥🔥🔥🔥🔥
Thank you.. You can follow our python tutorial... Lots of videos there.. Just check latest one.. You will find it usefull.
one of the best video for slicing . Hats off
Thank you.. Please share this video with others..
Tq for clarify my doubts....
Thanks and please do share
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
Thank you for the comment!
Thank you 😊 ❤
nyc one simple ppt but looks like animated!!
Thanks.. Please check playlists on my channel
This was the best on point explanation so far!!
U got yourself a new subscriber.
Thanks and please check playlists...
@@Codeyug Yes i do and the playlist is very helpful!
Well explained sir thank you ✅
Keep going.. Check courses in playlist section
Please explain me how the below slicing works?
Name[5: : -1]
Name[ :4 : -1]
Name[-1: -5: -3]
Name[0: -4 :-1]
You will get a video tomorrow...
Thank you 😊🙏🙏😊
Most welcome 😊
Best lecture thanks
Thnks
Could you please provide me def function based video along with question answer of python programming
Nyc
Very nice explained sir
Humari madam bhi fail hai aapke samne 😅❤
So nice
Please do share
Thank you bhai
You can follow playlists on this channel
I am beginner in django,it is very difficult to remember pip and other cmd commands for me,any solution?
well explained
Thanks
🔥
Java DSA ka bhi daliye sir
Homework answers:
1.
2.guy
3.g
4.
Well done!
@@Codeyug Thank you sir ☺️ , after watching tons of videos , I only understood after watching yours
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?
Please watch entire video carefully.. You will get the answer... Everything is covered
@@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.
@@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..
Check my latest short.. Your question is answered
@@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🗿
❤️
Gajak ka teaching skill h apka
Thanks and please share
#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")
Where is list slicing
list slicing is same as string slicing. You can apply this video on any collection in python.
#For fun try this 😂
Run_this ="udohyheuvkomlri"
print(Run_this[::-2])
#Done