title: python: reading a file and storing strings as strings and integers as integers into a list
body: <p>I am new to python and I've tried to look for this question everywhere but I couldn't find it I am not sure if this even works but here we go.....So I am trying to read a file with different types of variables and storing different regex into a list. Strings, floats, ints, keywords....etc all in a list, but they are all stored as strings in the list not different types.</p>
  
  <p>For example:</p>
  
  <pre><code>list1 = ['sandy', 'mike', '3.2', '15']
  </code></pre>
  
  <p>I want it to be stored into the list like this:</p>
  
  <pre><code>list1 = ['sandy', 'mike', 3.2, 15]
  </code></pre>
  
  <p>It is very important for me to know which ones are strings and which ones are numbers. </p>
  
  <p>I can't use dictionaries because they are not indexed plus they move around and I can't use tuples because they can't be "poped" off the stack, I can only use lists because they are indexed and I can use the pop method. </p>
  
  <p>Is there away of doing this when reading in a file?</p>