Bite 116. List and filter files in a directory
Login and get codingIn this Bite you complete
get_filesthat receives adirnameandsize_in_kb(note kb, not bytes).There are two things you need to code:
- Inspect/list the files in
dirname,- Return files that are bigger or equal than
size_in_kb(return alistor turn the function into a generator).The
osmodule is your friend here, but you also might want to check outglob. Have fun and keep coding in Python!
154 out of 155 users completed this Bite.
Will you be the 155th person to crack this Bite?
Resolution time: ~35 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 3.0 on a 1-10 difficulty scale.
» You can do it! 😌