Basically, I have a dictionary where all the keys are ints where the highest keys are at the end of the list and the lower keys are at the start (sort of like a list).
Note I can’t use a list for reasons I won’t go into.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Python’s ordered dictionary is what you are looking for. For example
You can still deal with an
OrderedDictthe same way you can deal with a normal dictionary, soAlso, this will work with any kind of key,
intsnot required.