title: How to use python read the txt file and compare values?
body: <p>I want to write a program to monitor the memory usage, First I need to read the following txt file of powershell command result
  <strong>counter_memory.txt</strong>:</p>
  
  <pre><code>Timestamp                 CounterSamples                                       
  
  ---------                 --------------                                       
  
  3/9/2017 12:34:33 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2710                                                 
  
  3/9/2017 12:34:34 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2710                                                 
  
  3/9/2017 12:34:35 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2710                                                 
  
  3/9/2017 12:34:36 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2713                                                 
  
  3/9/2017 12:34:37 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2713                                                 
  
  3/9/2017 12:34:38 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2714    
  </code></pre>
  
  <p>and the other one file <strong>counter_memory2.txt</strong>:</p>
  
  <pre><code>Timestamp                 CounterSamples                                       
  
  ---------                 --------------                                       
  
  3/9/2017 12:44:12 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:13 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:14 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:15 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:16 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:17 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:18 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:19 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:20 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764                                                 
  
  3/9/2017 12:44:21 PM      \\ins1617group15s\memory\available mbytes :          
  
                            2764   
  </code></pre>
  
  <p>After reading these file, I hope to take the average of each file counter values and save to the list for the baseline values. In the future, when the program reading the new txt file, the average values should compare with the baseline values and when the values is higher it will alert the user. What python modules should I use and how should I write each parts? I know the ideas may have something wrongs. Please give me a reference and feedback<br>
  Thanks you</p>