Skip to content
Snippets Groups Projects
Select Git revision
  • 639d7c53a23695b0ba886c490deaa37d3e2b7f73
  • master default protected
2 results

fibo-comp.py

Blame
  • 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"]))