Use del to delete the last item in shopping if the list is longer than 3 items.
del
shopping
Make sure to type del shopping[-1].
del shopping[-1]