Sololearn’s Introduction to Python course is wrapping up today with a brand new topic. Today’s post is wrapping up module four by introducing. You’ll learn what slicing is and how to slice a list in Python.

Sequences like lists and strings are ordered content. Ordered content is great for indexing and slicing. In addition to learning about slicing, Sololearn shares some advanced slicing and indexing tips to help you with your code.

Slicing

Slicing lets developers take portions from a list that they need. You’ll be slicing lists all the time in your Python code. At Coding with Kids, the students were slicing lists as they were building games.

To slice a list, put the variable name of list followed by an opening square bracket. Put the index you want to start slicing at. Place a colon (:) after this. Put the index when you want to stop slicing at then place the closing square brackets.