class File(list):
    def mettre_en_file(self, v):
        self.append(v)
    def retirer_file(self):
        return self.pop(0)

f = File()
f.mettre_en_file(3)
f.mettre_en_file(4)
f.mettre_en_file(1)
f.mettre_en_file(5)
print(f)                    # → [3, 4, 1, 5]
print(f.retirer_file())     # → 3
print(f.retirer_file())     # → 4
f.mettre_en_file(8)
print(f)                    # → [1, 5, 8] 
