def move(letter):
    return {'A': 'C', 'C': 'C', 'D': 'E', 'E': 'D', 'B': 'D'}.get(letter)
sorted_list = sorted(initial_list, key=move)
print([list(v) for k, v in groupby(sorted_list, key=move)])
Divide list to multiple lists based on elements value