I'm confused about this.
Say I have a function that is called everythird, and that takes a list as a parameter, and returns the every third element.
def everythird(l):
return l[0::3]
And if I input everythird([1,2,3,4,5,6,7]) and get back [1, 4, 7]. Is that considered a new list, modified list, or neither?
Also do methods modify or create new lists? What about splicing?