free_pc = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
daily_cash = 0


class Player:
    price = 100  # за час

    def __init__(self, nick, pc, hours):
        self.nick = nick
        self.pc = pc
        self.hours = hours
        self.cash = self.hours * Player.price
        global free_pc
        free_pc.remove(self.pc)  # удаляем пк из списка доступных
        global daily_cash
        daily_cash += self.cash

    def __len__(self):
        return self.hours

    def __str__(self):
        return f'user {self.nick} on {self.pc} pc played {self.hours} hours'

    def __del__(self):
        print(f'{self.pc} is free now')
        global free_pc
        free_pc.append(self.pc)


p1 = Player('qwe', 4, 5)
p2 = Player('asd', 2, 8)
p3 = Player('zxc', 1, 1)

print('свободные компы: ', *free_pc)
print(daily_cash)
print(p3)
del (p3)
print(free_pc)