List and filter files in a directory
Level: Intermediate (score: 3)
In this Bite you complete get_files
that receives a dirname
and size_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 alist
or turn the function into a generator).
The os
module is your friend here, but you also might want to check out glob
. Have fun and keep coding in Python!