python open each file in directory

import os
for filename in os.listdir(os.getcwd()):
   with open(os.path.join(os.cwd(), filename), 'r') as f:

Here is what the above code is Doing:
1. It’s looping through all the files in the current directory.
2. It’s opening each file in read mode.
3. It’s printing the contents of each file.
4. It’s closing each file.