Let's say there are three lists, the third being a list containing the first two:
Friendly_List = list()
Enemy_List = list()
Battle_Space = list([Friendly_List, Enemy_List])
self.Name = "Goblin"
self.HP = random.randint(15,20)
self.Damage = random.randint(5,10)
x = Goblin()
The simple but maybe not-so-clean way is
Battle_Space.remove(x). You would have to ensure that the first list is the friendly list.
My suggestion for readability would be to consider putting
enemy_list in a
BattleSpace object so you can refer to them by name. You can also create a method in that object to remove a target from any child list:
class BattleSpace(object): def __init__(self): self.friendly_list =  self.enemy_list =  def remove(self, target): if target in self.friendly_list: self.friendly_list.remove(target) if target in self.enemy_list: self.enemy_list.remove(target) battle_space = BattleSpace() battle_space.friendly_list.append(x) battle_space.remove(x) # can also do battle_space.friendly_list.remove(x)
Edit: Just read the OP's comment that the desire is to remove anywhere in the list. Modified code.