title: How can I loop-generate variable names?
body: <p>I see a comment below saying do it in containers like list or dictionary. Could you give me an example that will have the same effect like having a variable?</p>
  <p>I wrote some pseudo-input code and the final output I wanted to see (Just to have these variables in the system)</p>
  <ol>
  <li><p>input:</p>
  <pre><code> List_Tickers = {AMZN, FB, AAPL}
  
   def dataDataframe(symbols,TradeApp_obj):
   &quot;returns extracted historical data in dataframe format&quot;
   df_data = {}
   for symbol in symbols:
       df_data[symbol] = pd.DataFrame(TradeApp_obj.data[symbols.index(symbol)])
       df_data[symbol].set_index(&quot;Date&quot;,inplace=True)
   return df_data
  
  
   for ticker in List_Tickers
       df_{}.format(ticker)= pd.DataFrame[ticker]
  </code></pre>
  </li>
  <li><p>output:</p>
  <pre><code> df_AMZN = pd.DataFrame[&quot;AMZN&quot;]
  
   df_FB = pd.DataFrame[&quot;FB&quot;]
  
   df_AAPL = pd.DataFrame[&quot;AAPL&quot;]
  </code></pre>
  </li>
  <li><p>extra information</p>
  <p>a. I want to just change the contents within List_Tickers that it just auto-generate these dataframes and variables.</p>
  <p>b. The above function dataDataframe() will generate dataframes for each ticker.</p>
  <p>c. In the end, I want to save these dataframes into excel files individually for its ticker</p>
  </li>
  </ol>