title: How can I use items from list as variable and assign values to it?
body: <p>I want to read multiple csv files using pandas library and I want to assign that dataframe to items in the list using for loop.
  Currently I have two lists (One list contains dataframe names and second list contains dataframe)
  I am using below code for example:</p>
  <pre><code>list1 = ['amol', 'ankit', 'akshay', 'ashok'] # in actual there are 100+ items in the list
  marks = [50, 60, 70, 80]   # marks list actully contains dataframe - pandas.core.frame.DataFrame
  
  for ind, name in enumerate(list1):
      name = marks[ind]
  print(amol)
  
  # NameError: name 'amol' is not defined.
  </code></pre>
  <p>This is not assigning value to 'amol' and giving &quot;NameError: name 'amol' is not defined.&quot;</p>
  <p>I tried using dictionary.</p>
  <pre><code>list1 = ['amol', 'ankit', 'akshay', 'ashok']
  marks = [50, 60, 70, 80]
  
  mark_dict = {}
  
  for ind, name in enumerate(list1):
      mark_dict[name] = marks[ind] 
  print(mark_dict['amol'])
  </code></pre>
  <p>Dictionary is working but I want to assign value to 'amol' so below code can be executed and shold give me a output (in actual project it should return dataframe).
  Please advice how can I do it?</p>
  <pre><code>print(amol) 
  
  </code></pre>