def create_multidimensional_list(shape, element=None):
    """Creating a multidimensional list
    
       The recusion using list comprehension was obtained from create_empty_array_of_shape()
       at stackoverflow. Erko added element and the possibility to let element be a list.
       
       For example shape = [2, 3] returns [[None, None, None], [None, None, None]]

       Remarks:
       . The advantage of using lists instead of numpy arrays is that the elements in the
         list can be of any type.
       . Uses list() to take copy of element in case element is a list, to ensure that all
         elements in the multidimensional list will be unique. Without using list() all
         elements in the multidimensional list would relate and apply to a single element,
         due to how Python treats list instances.
    """
    # Implementation scheme A is much faster than the scheme B, therefore scheme B is
    # only kept in comment for comparison.
    
    # Scheme A recurses and then creates lowest dimensions with the elements first:
    if len(shape)>0:
        return [create_multidimensional_list(shape[1:], element) for i in range(shape[0])]
    elif isinstance(element, list):
        return list(element)  # take copy to ensure unique element
    else:
        return element

    # Scheme B recurses and then creates highest dimensions first:
    #if len(shape)>1:
    #    aList = shape[0] * [[]]
    #    for i in range(shape[0]):
    #        aList[i] = create_multidimensional_list(shape[1:], element)
    #else:
    #    if isinstance(element, list):
    #        aList = []
    #        for i in range(shape[0]):
    #            aList.append(list(element))  # take copy to ensure unique element
    #    else:
    #        aList = shape[0] * [element]
    #return aList