sorting list by an attribute that can be none,my_list.sort(key=nonesorter)