import ast
l = ast.literal_eval('[ "A","B","C" , " D"]')
l = [i.strip() for i in l]