• invalidusernamelol [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 months ago

        You’re right, it would return a list containing the first element of the sliced list.

        So:

        lst[:3:3] == [lst[0]]
        

        Well, technically a sequence containing the first element of whatever sequence you sliced. Take advantage of implementing magic methods and you too can abuse slice notation with your classes.