def readStringOfIterable(striter):
    """
    extract elements contained in a string and return the list of elements
    (5,9) -> [5,9]
    [2048.0 2048.0] -> [2048,2048]
    """
    if '[' not in striter and not '(' in striter:
        return striter
    ss = striter.strip()[1:-1]
    if ',' in ss:
        vals = ss.split(',')
    elif ' ' in ss:
        vals = ss.split()
    listvals = []
    for elem in vals:
        try:
            val = int(elem)
        except ValueError:
            try:
                val = float(elem)
            except ValueError:
                return striter.strip()
        listvals.append(val)
    return listvals
