Why does the solution use an else?

why the else:
return lst2[-1]

Because the instructions are to make the code return the last item of lst2 (which you get with -1) in the case that the length of lst2 is higher than lst1.

1 Like