title: reading a .txt file from a folder in python script
body: <pre><code>directory =os.path.join("C:\\Users\\Desktop\\udi\\pcm-audio") 
  for subdir, dirs, files in os.walk(directory): 
      for file in files: 
          if file.endswith(".txt"): 
              f=open(os.path.join(subdir, file),'r') 
              a = f.read() 
              if re.findall('\"status_code\": 0', a):
                  print('Valid one') 
              else: 
                  print('Invalid') 
          f.close()
  </code></pre>
  
  <p>I have to read only a .txt file from the folder, so I am doing as above. Later I am trying to print what I read. But I am not getting any output when I run the above program. Can someone help me what is the mistake in that ? </p>