This is the first time I post in stack overflow. Perhaps I can get the solution that I need.
busdata=shelve.open("Database")
for lctno in busdata.keys():
outputLine( lctno , busdata[ lctno ])
It randomly display the data in my .dat file. I want it to display in ascending order.
sorted(busdata.keys())
but ashelve
is inherently unordered. – Stumpy