
Zachary T. answered 03/06/20
Computer Programming Course Development Assistant, Berklee College
These are all examples of slicing. Strings in python allow the user to slice them into chunks. For instance, if our string
we would be able to get slices like this:
When Python sees a slice which is missing a start or end argument, it fills in defaults -- the start is assumed to be 0 and the end is assumed to be the last value in the string (which we can call -1).
you should be able to use this knowledge to check the answers to these in Python on your computer.