python sort dict by two values