Hey so im working on this question on slicing the middle of a list. I wanted to know if there is a dynamic way to getting the middle of a list. I personally just counted the list and subtracted an equal amount on both ends to get the middle. but I could imagine if I had a list that thousands or millions of indexes long I probably wouldn’t be able to do that.
suitcase = ['shirt', 'shirt', 'pants', 'pants', 'pajamas', 'books'] beginning = suitcase[0:4] print(beginning) middle = suitcase[2:4] print(middle)