Update dehydron.py

simplify sorting