Created
June 25, 2019 10:54
-
-
Save mayhem/c05e1be9735778abbfd6d5beedd42644 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
data = [(5, "Pogues, The"), (6, "void"), (2, "U2"), (3, "Foo Fighters"), (1, "Zambiana"), (7, "void")] | |
data_index = list(range(len(data))) | |
data_index = sorted(data_index, key=lambda rec: data[rec][1]) | |
for i in data_index: | |
print(data[i]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment