8 lines
199 B
Python
8 lines
199 B
Python
import shelve
|
|
import sys
|
|
|
|
if __name__ == "__main__":
|
|
with shelve.open(sys.argv[-1]) as shelf:
|
|
for k, v in sorted(shelf.items(), key=lambda tup: (tup[1], tup[0])):
|
|
print(k, v)
|