"Write a function named larger_list that has two parameters named lst1 and lst2 .
The function should return the last element of the list that contains more elements. If both lists are the same size, then return the last element of lst1 ."
I don’t know if I was on the right track, but what I did first was create a variable called lst1_range = range(0,20,2). I feel like this isn’t what it wants.
The two lists in the print function are just for example. You don’t have to use lst1 = [], you can just use the parameters without default assignments.
I get it now. So what I was doing was using lst.count() instead of len(). That’s why I couldn’t figure out why it kept saying it should have returned 5, instead it returned 10.
The idea is to return the last element of the list with the greatest length. If they have the same length, you should return the last element of the first list.