def last_element(some_list): '''return the last element of some_list''' if len(some_list) > 0: return some_list[-1] # last element else: return None def delete_first(some_list): '''removes the first element of some_list''' del some_list[0] def list_add(some_list, el): '''add el to some_list''' some_list.append(el) def second_largest(my_list): '''returns the second largest value of my_list''' # use a copy so we don't change the original list list_copy = my_list.copy() list_copy.sort() return list_copy[-2] def last_three(some_string): '''returns the last three characters of some_string''' return some_string[-3:]