Python Tutorial: Slicing Lists and Strings

///Python Tutorial: Slicing Lists and Strings

Python Tutorial: Slicing Lists and Strings

FavoriteLoadingAdd to favorites

In this video we will look at how to slice lists and strings in Python. Slicing allows us to extract certain elements from these lists and strings. This can be extremely useful for stripping out certain values from lists or getting a substring of a characters from a string. Let’s take a look at a few code examples.

The code from this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Python

source

By |2019-08-24T22:19:42+00:00August 24th, 2019|Python Video Tutorials|44 Comments

44 Comments

  1. Harish Vemula August 24, 2019 at 10:19 pm - Reply

    Mindblowing !!

  2. Arun Kumar August 24, 2019 at 10:19 pm - Reply

    Awesome explanation Corey 😊

  3. Leo August 24, 2019 at 10:19 pm - Reply

    Sub'd

  4. M H8mts August 24, 2019 at 10:19 pm - Reply

    I am currently watching these tutorials from his playlist 'Python tutorials'. Are these videos in order?

  5. Kidale Smith August 24, 2019 at 10:19 pm - Reply

    you helped me so much thank you

  6. Kidale Smith August 24, 2019 at 10:19 pm - Reply

    The reason he started with -4 is because it's a LOT easier than counting 14 like i did lol

    [14: ] is the same as [-4: ]

  7. Ifere Okibe August 24, 2019 at 10:19 pm - Reply

    Best slicing tutorial ever made. So simple and easy to follow

  8. Shaz Flicks August 24, 2019 at 10:19 pm - Reply

    This video made it clear my confusion for a very long time….😮 – 🙏
    the slice part is fun….😂

  9. Akash 1x25 August 24, 2019 at 10:19 pm - Reply

    why the print () syntax used here is different and not giving error

  10. Munir Sami Nuristani August 24, 2019 at 10:19 pm - Reply

    How can we select two non sequential indexes. For example from list of 1,2,3,4,5,6,7,8 i would like to chose 3rd and 7th indexes. how can i do that?

  11. Rashi Gupta August 24, 2019 at 10:19 pm - Reply

    I rarely comment on yt videos …but this deserves all allocades.This is awesome , I must say … Here my doubt got cleared for which I have been looking everywhere
    …Glad to come across this channel !!!

  12. Shamel Addas August 24, 2019 at 10:19 pm - Reply

    Excellent video! One question: Is there a way to index particular items from a list that don't have a patterned sequence? For example, index 0, 2, 5, 6,10?

  13. MG Nagaraj August 24, 2019 at 10:19 pm - Reply

    Thank you very much Mr.Corey Schafer.. your explanation was very simple, easy to understand and to the point..

  14. Navot Shiener August 24, 2019 at 10:19 pm - Reply

    It's been a long time since I last saw a youtube video made so well it was worth mentioning. Well done

  15. Simon Zzz August 24, 2019 at 10:19 pm - Reply

    great I need this shit to finish my shitty hw

  16. Danny Bell August 24, 2019 at 10:19 pm - Reply

    Can anyone explain how a comment line is taken to a print command? ( point 8:03) in this video. Is this a sublime function?

  17. Jacob Malott August 24, 2019 at 10:19 pm - Reply

    I've learned more from your videos today than through an entire semester of Python3 at uni. Thanks so much!

  18. Marthe Julie Dorcena August 24, 2019 at 10:19 pm - Reply

    Thank you!!! Great video!

  19. Anton Lindén August 24, 2019 at 10:19 pm - Reply

    Thanks for the video! Great content!

  20. Pace De La Cruz August 24, 2019 at 10:19 pm - Reply

    Thank you!!

  21. Thomas Eulogy August 24, 2019 at 10:19 pm - Reply

    All the infos are awesome! But as a ultimate beginner (I´m having hints where would it be good to apply) it would be even more awesome to add where does it apply in real "job like" enviroment. Just a thought.

  22. Rahul Varshney August 24, 2019 at 10:19 pm - Reply

    great!!!!

  23. Robert DiFazio August 24, 2019 at 10:19 pm - Reply

    mind blown, problems solved. Thanks!

  24. Allen Michael Cohen August 24, 2019 at 10:19 pm - Reply

    Python 3.7.x requires parens for "print"

  25. Evan Zhao August 24, 2019 at 10:19 pm - Reply

    Is this Python 2? I came here to learn Python 3…

  26. pledgeshield August 24, 2019 at 10:19 pm - Reply

    Thank you for the good lesson!

  27. Suraj Singh August 24, 2019 at 10:19 pm - Reply

    Thank a lot!!!

  28. Daniel Pelnar August 24, 2019 at 10:19 pm - Reply

    A very good teacher. Much better than some of the paid courses on Udemy.

  29. Beast August 24, 2019 at 10:19 pm - Reply

    i think iam the only indian who is watching your lectures….

    good job sir..

  30. hasan tarek August 24, 2019 at 10:19 pm - Reply

    one of the most confusing parts of python has been clarified after a long time. I have been trying to learn one programming for last 4 years and failed every time because of a lack of quality video like yours. thank you.

  31. Jenni Aly August 24, 2019 at 10:19 pm - Reply

    U are life saver my teachers don’t explain properly thank you so much ❤️

  32. Revaz Zhvania August 24, 2019 at 10:19 pm - Reply

    Corey is the type of guy that when the ads come on his videos, i watch them and then click on them so he can get paid more. Amazing

  33. Vincent Wahid Ajoubi August 24, 2019 at 10:19 pm - Reply

    I'm glad that I'm the 920th that liked this video. So simple yet in details!

  34. Fabian Cardozo August 24, 2019 at 10:19 pm - Reply

    Can I use this to move each element of a list one place to the right? Like [1,2,3] to [3,1,2]. Good video btw

  35. Jugal Gore August 24, 2019 at 10:19 pm - Reply

    Which software are you using Corey? And is it available on Windows 10?

  36. Print Name Here August 24, 2019 at 10:19 pm - Reply

    I tried 3 different sources to get the hang of it, and this actually made sense 100%. I really appreciate it, I'll be watching your videos instead.

  37. Mayank Saxena August 24, 2019 at 10:19 pm - Reply

    Amazingly Explained the very confusing topic

  38. Jason Cruz August 24, 2019 at 10:19 pm - Reply

    this is such a great video! Im finally starting to understand how lists play a part of this python language!! Thank you so much!

  39. Jeck Facer August 24, 2019 at 10:19 pm - Reply

    How do you remove characters in the middle?

  40. Jeck Facer August 24, 2019 at 10:19 pm - Reply

    How do you remove characters in the middle?

  41. MD. Ashfaqur Rahman Tahashin August 24, 2019 at 10:19 pm - Reply

    Really glad to you. You are the most amazing I have got. Explanation is simple and as well as deep which makes concept clear. Thanks a lot brother

  42. ThangHoang August 24, 2019 at 10:19 pm - Reply

    very goods video, clear , thanks you very much

  43. Your Worst Nightmare August 24, 2019 at 10:19 pm - Reply

    I love you man! I'm doing my exams for computer sciences and I didn't understand this part. Now I'm all good

  44. Yusop P. August 24, 2019 at 10:19 pm - Reply

    Thank you for your well defined explanation 🙂 I just sub!

Leave A Comment

*