avatar Bite 116. List and filter files in a directory

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:

  1. Inspect/list the files in dirname,
  2. Return files that are bigger or equal than size_in_kb (return a list 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!

Login and get coding
go back Intermediate level
Bitecoin 3X

152 out of 153 users completed this Bite.
Will you be Pythonista #153 to crack this Bite?
Resolution time: ~35 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 3.0 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help