<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_files(directory):
 """Returns all files in a given directory """

    return [f for f in pathlib.Path(directory).iterdir() if f.is_file() and not f.name.startswith('.')]