if I have a list, say:
ll = [\'xx\',\'yy\',\'zz\']
and I want to assign each element of this list to a separate variable:
v
I have found a decent application for it. I have a bunch of csv files which I want to save as a dataframe under their name:
all_files = glob.glob(path + "/*.csv")
name_list = []
for f in all_files:
name_list.append(f[9:-4])
for i,n in enumerate(name_list):
globals()[n] = pd.read_csv(all_files[i])