title: Python recursion with for loop
body: <p>I want to process some files with Python and have below scripts:</p>
  
  <pre><code>import pandas as pd
  loc1 = r'D:\1103\DC431.txt'
  loc2 = r'D:\1103\DC432.txt'
  loc3 = r'D:\1103\DC433.txt'
  loc4 = r'D:\1103\DC434.txt'
  loc5 = r'D:\1103\DC435.txt'
  loc6 = r'D:\1103\DC436.txt'
  loc7 = r'D:\1103\DC437.txt'
  # Start
  df1 = pd.read_table(loc1, sep=('\t'), engine='python')
  df2 = pd.read_table(loc2, sep=('\t'), engine='python')
  df3 = pd.read_table(loc3, sep=('\t'), engine='python')
  df4 = pd.read_table(loc4, sep=('\t'), engine='python')
  df5 = pd.read_table(loc5, sep=('\t'), engine='python')
  df6 = pd.read_table(loc6, sep=('\t'), engine='python')
  df7 = pd.read_table(loc7, sep=('\t'), engine='python')
  
  s1 = df1[df1['No (Int)'] == 4]
  s2 = df2[df2['No (Int)'] == 4]
  s3 = df3[df3['No (Int)'] == 4]
  s4 = df4[df4['No (Int)'] == 4]
  s5 = df5[df5['No (Int)'] == 4]
  s6 = df6[df6['No (Int)'] == 4]
  s7 = df7[df7['No (Int)'] == 4]
  # End
  
  # Other scripts
  </code></pre>
  
  <p>I was trying to simplify the scripts between Start to End of the above using for loop, but python cannot identify:</p>
  
  <pre><code>for n in range (1,8):
      dfn = pd.read_table(locn, sep=('\t'), engine='python')
      sn = dfn[dfn['No (Int)'] == 4]
  </code></pre>
  
  <p>Anyone have good idears?</p>