def SplitListByGrouping(list, x):
    """
    Receive a list of items.
    If the length is longer than x, then split the list into several lists,
    each with a maximum of x elements.
    This is then returned as a 2D array.
       
    Args
        list: list of items in any format or mixed. 
              e.g. ['ABC', 23590.34, 23]
              If a single string is inputted, then the string is split
                  e.g. 'a235235' -> ['a23', '523', '5']
        x:  maximum length to be allowed for any single list. 
            e.g. 100
    Returns:
        outputList: list of items, where each item is a list of maximum 
                    length x.
    """
    outputList = []
    index = 0

    while index < len(list):
        item = list[index : (index + x)]
        outputList.append(item)
        index += x
    return outputList