import itertools


def get_permutations(a):
    """
    get all permutations of list a
    """
    p = []
    for r in range(len(a)+1):
        c = list(itertools.combinations(a,r))
        
        for cc in c:
            p += list(itertools.permutations(cc))
    return p