from random import choice, randint

class Osoba:
    def __init__(self, name, age=30, sex="M"):
        self.name = name
        self.sex = sex
        self.age = age
        print(f"Start obiektu: {id(self)} - plec: {self.sex} wiek: {self.age}")

    def __del__(self):
        print (f"Bye, bye: {id(self)}....")

    def __str__(self):
        return f"Oto osoba - {self.name} "

lista_osob = []
for nr in range(10):
    wiek = randint(20,50)
    plec = choice(["M","K","X"])
    osoba = Osoba("Jurkiewicz", sex=plec, age=wiek)
    lista_osob.append(osoba)
    lista_osob.append(osoba)

print(lista_osob)
print("----------------------")
for osoba in lista_osob:
    print(osoba)