I opened a folder in that many file and I want to parse every file and and pre process it and write tokens into the same current files which they belong to. Please help me with that.
Asked
Active
Viewed 996 times
-2

Ravi kant Gautam
- 333
- 2
- 23
-
try to clear all the white space around the problematic code snippet or below and above it a few rows, there is some hidden character somewhere I guess. – Geeocode Nov 28 '18 at 07:40
-
Refer to this https://stackoverflow.com/questions/10377998/how-can-i-iterate-over-files-in-a-given-directory – Vignesh Krishnan Nov 28 '18 at 07:41
1 Answers
-1
Your code probably has whitespaces and tabs mixed with each other.
One way to solve this would be replacing all spaces with tabs or vice versa.
But as mentioned by https://stackoverflow.com/users/10611983/tomothy32 PEP8 recommends spaces so use spaces.
Try this and it should work.

waqasgard
- 801
- 7
- 25
-
[PEP 8](https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces) recommends spaces, not tabs. – iz_ Nov 28 '18 at 08:11