how to remove last item in array in python code example Example: python remove last element from list record = record[:-1]