title: how to print the first index of multiple lists in a text file in python
body: <p>I was given this project to work on in class and the one major issue that I'm having trouble with is getting the first indexes of each list from a text file separated into their own category and creating an indefinite list of said category. The first indexes are supposed to be their own data set for the user to choose from, and this will be applied regardless of how many lists there will be.</p>
  <p>An example of this would be taking a text file such as this:</p>
  <pre><code>Silver Lake, 32, 35, 25
  Pasadena, 55, 75, 20
  Los Angeles, 3500, 3000, 500
  </code></pre>
  <p>and being able to categorize it as:</p>
  <pre><code>The cities in our available data set:
  A - City 1
  B - City 2
  C - City 3
  Please select your status: A
  </code></pre>
  <p>Where the data set could be expanded with the options selection input automatically adjusting to it
  I've only managed to get this far:</p>
  <pre><code>def title():
      print(&quot;City Population Projector&quot;)
      print(&quot;Select a city from the list: &quot;)
  
  def list():
      with open(&quot;population.txt&quot;, &quot;r&quot;) as projections:
          cities = projections.read()
          print(cities)
  
  
  if __name__ == &quot;__main__&quot;:
      title()
      list()
  </code></pre>