Sorting A Linked List In Python Code For Snake