title: Weighted Search and Sort Python
body: <p>I am creating a creature simulator in python, and the first thing I am doing is to search for food. Naturally one of the things to search by is distance, but I also want to sort by quality of the food source. Is there a good way to do this? I figured I'd get a list of all possible sources and then sort the list and I know python has built in sort functions but I don't really understand the lambda part of it.</p>