Select Git revision
priorite.py
Forked from
Vuillemot Romain / INF-TC1
Source project has a limited visibility.
-
Romain Vuillemot authoredRomain Vuillemot authored
tri-stabilite.py 344 B
def algo(words):
t = []
for word in words:
t.append((len(word), word))
t.sort(key=lambda t: t[1][-1])
res = []
for l, w in t:
res.append(w)
res = filter(lambda t: 'a' in t, res)
return list(res)
if __name__=="__main__":
print(algo(["Pierre", "Jean", "Marie", "Eric", "Nathalie", "Yvonne"]))