Thank you all for the help before. I now had completed a task (so I thought) in order to achieve the following: I needed to write a one liner which outputs filenames that have more than 10 characters and also their contents consists out of more than 10 lines. My code is the following:
import os; [filename for filename in os.listdir(".") if len(filename) > 10 and len([line for line in open(filename)]) > 10 if filename =! filename.endswith(".ipynb_checkpoints")]
The problem that exists is the following error:
[Errno 13] Permission denied: '.ipynb_checkpoints'
I tried to exclude the .ipynb_checkpoint-files but it still doesn´t work properly. Do you have any suggestions on how to exclude them or solve my problem? Thank you for your time!
Greetings.