class Weapon:

    def __init__(self, owned, damage, price, accuracy):
        self.owned = owned
self.damage = damage
self.price = price
self.accuracy = accuracy

def flip_weapon_owned_value(self):
    self.owned = False if self.owned else True
print('\n', self.owned)
Редактирование значений dict в методе