human
I am working on the file "Algoritmos I/2018-2C/clase_objetos.ipynb".
The first task is:
Clase Escuadron
Can you write Python code for it?
 ... Give me a the Python code you requested?
assistant
#Here is the Python code you requested.

class Squad:
    """Clase que representa un escuadron de soldados"""

    def __init__(self, leader):

        self.leader = leader
        self.squad = set()

    def add_soldier(self,soldier):
        """Agrega un soldado al escuadron"""

        if not isinstance(soldier,Soldier):
            raise TypeError("El escuadron solo puede agregar soldados")

        self.squad.add(soldier)

    def kick_soldier(self):
        """Elimina un soldado del escuadron"""

        pass

    def get_soldiers(self):
        """Devuelve todos los soldados del escuadron, formados"""
        
        # soldiers = [ soldier for soldier in self.squad ]
        # soldiers.sort()
        # return soldiers
        return sorted(self.squad)

    def get_soldiers_amount(self):
        """ """
        return len(self.squad)