Session Ready
Exercise

Is this pattern True?

As the head of data science you often get called in to help a new data scientists track down an important intermediate csv file that has gone missing. This has taken so much time, that you have decided to write an automated script that identify all csv files that are created by a user and then copy them to centralized storage. As the first step to create this near line backup solution you have to write a function that can filter and return only csv matches.

Use the fnmatch.filter function to filter for csv files from a list of files. Make sure you write a Python function so it can be portable code that a larger system can be built from.

Instructions
100 XP
  • Use fnmatch.filter to check for csv files in a list of files.
  • Write a function that returns these matches.