Two short functions are defined. One gives back a slice, and the other adds an item to a list.
def head(v, n=2):
return v[:n]
def bump(v):
v.append(len(v))
return len(v)
Which of these comparisons are True? Choose two.
One or more options are correct. Tick all the correct ones: a wrong option costs marks, and a part-right answer earns part of the marks.