def str2list(string):
    """Returns list contained in a string.
    
    Args:
        string (str): A string containing a list.
    
    Returns:
        (list): inferred list from the string.
    """
    # Removing brackets "[" "]" from the string
    string = string[1:-1]

    # Splitting at ","
    output = string.split(",")

    # Removing trailing, leading space and residue ' ' characters
    output = [ string.strip()[1:-1] for string in output ]

    return output