title: How can I read in lists within a list using ConfigParser() in Python?
body: <p>I have seen a lot of answers on how to read in a list using ConfigParser in Python:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/335695/lists-in-configparser">Lists in ConfigParser</a></li>
  <li><a href="https://stackoverflow.com/questions/6759016/getting-a-list-from-a-config-file-with-configparser">Getting a list from a config file with ConfigParser</a></li>
  <li><a href="https://stackoverflow.com/questions/45948411/how-to-store-dictionary-and-list-in-python-config-file">How to store dictionary and list in python config file?</a></li>
  <li><a href="https://stackoverflow.com/questions/38769428/get-a-list-from-config-ini-file">Get a list from config.ini file</a></li>
  </ul>
  
  <p>But I am wondering how I can read in a list with multiple lists</p>
  
  <p>For example, I have a <strong>config.ini</strong>:</p>
  
  <pre><code>[INPUT]
  values = [[40000, 60000], [70000, 80000]]
  </code></pre>
  
  <p>A function in my <strong>main.py</strong> needs to read the above as:</p>
  
  <pre><code>[[40000, 60000], [70000, 80000]]
  </code></pre>
  
  <p>I am not sure if it matters, but values can be any size list, so for example:</p>
  
  <pre><code>[[40000, 60000]]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>[[40000, 60000], [70000, 80000], [90000, 95000]]
  </code></pre>
  
  <p>I know the below will not work, but for clarity, I am reading the lists within the list into <strong>main.py</strong> like this:</p>
  
  <pre><code>self.values = config['INPUT']['values']
  </code></pre>
  
  <p><code>self</code> is there because I am using a class. These are my declarations in the beginning of <strong>main.py</strong>:</p>
  
  <pre><code>import configparser
  config = configparser.ConfigParser()
  config.sections()
  config.read('config.ini')
  </code></pre>