def switch_inventory(self, index):
        """
        Change selected element in the inventory
        :param index:integer
        :return:None
        """
        if len(self.inventory):
            self.block = self.inventory[len(self.inventory) % index]
dataset/ETHPy150Open traverseda/pycraft/pycraft/objects/player.py/Player.switch_inventory/swapped operands of `%`