title: How to store dictionary and list in python config file?
body: <p>I'm using config.ini file to store all my configurations.</p>
  
  <p>I need to store a dictionary and a list in the config file and parse it in my main.py file using configparser. Can anyone please tell me how do I go about doing that?</p>
  
  <p>config.ini:</p>
  
  <pre><code>[DEFAULT] 
  ADMIN = xyz 
  SOMEDICT = {'v1': 'k1', 'v2': 'k2'}
  SOMELIST = [v1, v2]
  </code></pre>
  
  <p>main.py:</p>
  
  <pre><code>config = configparser.ConfigParser() 
  config.read('config.ini') 
  secret_key = config['DEFAULT']['ADMIN']
  </code></pre>
  
  <p>If there is no way to do this, is config in json format a good option?</p>