PYTHON how to save variables to a file which orders them : For I task I'm required to save variables to a new file, I can do this but don't know how I will be able to order the file. The file will contain a string and integer I want to order it from highest integer to lowest would appreciate the help.