title: Python: How can I open a folder with variable
body: <p>question again... I have a list <code>A=['AA','BB','CC']</code> and  a folder path like <code>./ABC/</code>. There are three sub folder inside called <code>032_AA, 0244_BB, 01_CC</code>
  format is like <code>random number_AA(BB or CC)</code>. </p>
  
  <p>now I tend to use this list to enter these folder and open a txt file which in there sub folder:</p>
  
  <pre><code>cmd1='cd ABC'
  os.sys(cmd1)
  for i in A:
      ???????? ---------------------- enter folder 032_AA according to list A
      with open('xxx.txt','a') as f:
      XXXXXXXX
  </code></pre>
  
  <p>my main question is I dont know how to enter a folder with a known file name with random number as begining.
  So any idea? Thanks!</p>