I have a variable with a string value in it. I want to create a list with the value as its name/identifier, then append values to the list. So assuming variable s = \"
s = \"
You can use globals():
globals()
>>> strs = "temp1" >>> globals()[strs] = [] >>> temp1 []
But using a dict for such purpose would be more appropriate:
>>> dic = {strs:[]} >>> dic["temp1"] []