fork download
  1. a = [['UK', 'FR', 0.021], ['UK', 'NL', 0.094], ['UK', 'PT', 0.034]]
  2.  
  3. print(a)
  4.  
  5. a.sort(key=lambda l: l[2], reverse=True)
  6.  
  7. print(a)
Success #stdin #stdout 0.02s 6908KB
stdin
Standard input is empty
stdout
[['UK', 'FR', 0.021], ['UK', 'NL', 0.094], ['UK', 'PT', 0.034]]
[['UK', 'NL', 0.094], ['UK', 'PT', 0.034], ['UK', 'FR', 0.021]]