title: How to read parameter values from a file in Python
body: <p>I'm starting to learn Python and encountered a few issues while trying to read values from a file.</p>
  
  <p>My parameter file is somewhat like this:</p>
  
  <pre><code>var1 11111111
  path_value "some/space containing path/file.txt"
  var3 something
  #some other values
  var4 some/value1
  var5 some/value2
  var6 some/value3
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>file=open('this_file.txt')
  for line in file:
      fields = line.strip().split()
      if(fields[0] in "var1"):
          ## this will give me 11111111
          var_1_value=fields[1]
      if(fields[0] in "path_value"):
          ## this will give me only till "/some/space
          path_value_contains=fields[1]
  </code></pre>
  
  <p>How do I fetch the path properly? I'm not sure this is an efficient way of doing things. Can you please let me know any better ways to do this?</p>
  
  <p>I'm not using any modules.</p>