A basic program that intends to generate a new list containing the elements of list2
. Followed by the elements of list1
in reverse order I can't seem to understand what the commented line means.
def combine_lists(list1, list2):
new_list = list2
for i in reversed(range(len(list1))): #this one
new_list.append(list1[i])
return new_list
Jamies_list = ["Alice", "Cindy", "Bobby", "Jan", "Peter"]
Drews_list = ["Mike", "Carol", "Greg", "Marcia"]