Lists are not sets. They have an ordering. You are doing an equality test with a list, but that means the order has to be correct as well.
>>> ["a", "b"] == ["b", "a"] FalseIf you don't care about the order, make your inventory a set. You can still add and remove items, but order is no longer important.
>>> {"a", "b"} == {"b", "a"} True