title: How to read text file line by line and save values into variables in python
body: <p>I want to read my parameter file line by line and save the values into a variable my parameter file look something like that</p>
  
  <p>Parameter File</p>
  
  <pre><code>DBHOSTNAME=192.168.x.x
  DBSID=SID
  BEUSERNAME=username
  BEUSERPASSWORD=password
  HOSTPATHBE=path
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>file = open('envparam.config')
      for line in file:
          fields = line.strip().split()
          print (fields[0])
  </code></pre>
  
  <p>So far I am able to read my parameter file but not able to store values into variables can anyone help me with this</p>