title: Create a list of all variables containing a certain pattern
body: <p>I am trying to create a list of all <code>varN</code> variables , where <code>N</code> is a number. Let's say I have 6 <code>varN</code> variables and I want to create a list <code>vars_lst</code> containing all the values belonging to the <code>varN</code>: </p>
  
  <pre><code>vars_lst = [var0, var1, var2, var3, var4, var5]
  </code></pre>
  
  <p>I have tried to do it with a for loop: </p>
  
  <pre><code>var0 = 10
  var1 = 20
  var2 = 30
  var3 = 40
  var4 = 50
  var5 = 60
  vars_lst = []
  for i in range(6):
      vars_lst.append("var" + str(i))
  print(vars_lst)
  </code></pre>
  
  <p>But the problem is that the list contains the strings <code>var1</code> - <code>var6</code>, not the variables values. </p>
  
  <pre><code>['var0', 'var1', 'var2', 'var3', 'var4', 'var5']
  </code></pre>
  
  <p>And I want it to contain: </p>
  
  <pre><code>[10, 20, 30, 40, 50, 60]
  </code></pre>
  
  <p>[EDIT]
  This is actually my script: </p>
  
  <pre><code>import os, subprocess
  
  vmaf_line1 = "VMAF STATISTICS for " + inp_file + ":"
  vmaf_line2 = "========================="
  vmaf_line3 = "PSNR Average:       " + str(psnr_avg) + "dB"
  vmaf_line4 = "PSNR Minimal:       " + str(psnr_min) + "dB"
  vmaf_line5 = "PSNR Maximal:       " + str(psnr_max) + "dB"
  vmaf_line6 = "========================="
  vmaf_line7 = "SSIM Average:       " + str(ssim_avg)
  vmaf_line8 = "SSIM Minimal:       " + str(ssim_min)
  vmaf_line9 = "SSIM Maximal:       " + str(ssim_max)
  vmaf_line10 = "========================="
  vmaf_line11 = "MS-SSIM Average:    " + str(ms_ssim_avg)
  vmaf_line12 = "MS-SSIM Minimal:    " + str(ms_ssim_min)
  vmaf_line13 = "MS-SSIM Maximal:    " + str(ms_ssim_max)
  vmaf_line14 = "========================="
  vmaf_line15 = "VMAF Average:       " + str(vmaf_avg)
  vmaf_line16 = "VMAF Minimal:       " + str(vmaf_min)
  vmaf_line17 = "VMAF Maximal:       " + str(vmaf_max)
  vmaf_line18 = "========================="
  vmaf_lines = []
  for i in range(1, 19):
      vmaf_lines.append(locals()["vmaf_line" + str(i)])
  write_file(vmaf_lines, log)
  
  def write_file(lines_list, log_file):
      if not os.path.isfile(log_file):
          subprocess.call(["touch", log_file])
      line_num = 1
      for i in range(len(lines_list)):
          line_content = str(line_num) + "i" + lines_list[i]
          subprocess.call(["sed", "-i", line_content, log_file])
          line_num +=1
      return None
  </code></pre>
  
  <p>So what I am trying to do is to insert all these vmaf_lines into a log file</p>