title: How to get number form multi text files name and use it?
body: <p>I'm a new python user. I try to write a script to deal with multiple text files all of them the same name and indexed like </p>
  
  <pre><code>sample1_freq780Hz_accRate600Hz_V3Volt_1_.txt
  sample1_freq780Hz_accRate600Hz_V3Volt_2_.txt
  sample1_freq780Hz_accRate600Hz_V3Volt_3_.txt
  </code></pre>
  
  <p>I used this code:</p>
  
  <pre><code>def get_numbers_from_filename(filename):
    result = re.search(r'\d+', filename).group(0)
    return result for filename in os.listdir('input/'): 
    print(get_numbers_from_filename(filename))
  </code></pre>
  
  <p>but it didn't give me the wanted results
  I need a code to get the numbers as follow:</p>
  
  <pre><code>freq: 780 Hz
  accRate: 600 Hz
  V: 3 Volt
  </code></pre>
  
  <p>and how to deal and use these numbers as parameters inside the full script?</p>