python basic 数据类型 list array, 列表, 数组 list/dict str to list/dict 1 2 3 4 5 6 7 8 >>> import ast >>> x = '[ "A","B","C" , " D"]' >>> x = ast.literal_eval(x) >>> x ['A', 'B', 'C', ' D'] >>> x = [n.strip() for n in x] >>> x ['A', 'B', 'C', 'D'] colon syntax 1 2 3 4 5 6 7