Python program for assigning ranks and ordering the list of LinkedIn connections