0 points

Python: convert a string representation of a list to a list


dashboard

Tue May 26 2020 16:35:55 GMT+0000 (UTC)

Posted by @tisg #python

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