import string


def unpack_selection_items(selection_items):
    """Unpacks slice notation into seperate items
    
    ["pPlane1.vtx[50:52]"] -> ["pPlane1.vtx[50]", "pPlane1.vtx[51]", "pPlane1.vtx[52]"]
    """
    unformatted = []
    for selection_item in selection_items:
        if ":" not in selection_item:
            unformatted.append(selection_item)
            continue
        name, type_ = selection_item.split(".")
        type_ = filter(lambda x: x in string.ascii_letters, type_)
        nums = selection_item.split('[', 1)[1].split(']')[0]
        num1, num2, = [int(i) for i in nums.split(":")]
        unformatted.append(["{}.{}[{}]".format(name, type_, i) for i in range(num1, num2 + 1)])
    formatted = []
    for i in unformatted:
        if type(i) != list:
            formatted.append(i)
        else:
            for j in i:
                formatted.append(j)
    return formatted