I'm having trouble with this question:
Write a function insert_item_end(data, item) that takes a list data, and item as a parameter and returns a new list that contains item at the end of the data using the insert method (i.e. you cannot use append).
This is what I've done so far:
data.insert(-1, item)
However, this only returns None.
Here is an example of what I want to return:
([1, 2, 3, 4, 5], 1) returns [1, 2, 3, 4, 5, 1]