This is an extension on my previous question which was suitably answered, seen here: Sorting dictionary keys by value, then those with the same value alphabetically
I have a setup of users and scores in a dictionary, such that the key is "group.name" and the value is their score (e.g. "'3.Julie':'7' is a user "Julie" in group 3 with a score of 7). I already know how to sort it by value, and then by key:
sorted(dictionary.items(), key=lambda t: t[::-1])
but when it compares two keys, I want it to ignore the first character/two characters, so that users with the same score will be sorted alphabetically (whereas currently, they'd be sorted by group, as the group number comes first). Without changing the naming convention, is there anyway I can achieve this? (Ideally within the lambda key, a few lines is fine but if there's more than 2-3 it's not worth it)