I use a list as part of a Python program, and wanted to convert that to an environment variable.
So, it\'s like this:
list1 = [\'a.1\',\'b.2\',\'c.3\']
I'm not sure why you'd do it through the environment variables, but you can do this:
export LIST_ITEMS ="a.1 b.2 c.3"
And in Python:
list1 = [i.split(".") for i in os.environ.get("LIST_ITEMS").split(" ")] for k, v in list1: print(k, v)