![]() ![]() The result is a list of string filenames-no folder names and no filenames of files in subdirectories (non-recursive). You place any filename f that satisfies these two conditions in a list without modifying it.For a string value f that is not a filename (e.g., a folder name), this function would return False and it would be excluded from the iteration. You restrict the iterable using the if os.path.isfile(f) clause to all strings that are filenames.In our example, this would evaluate to the l i st. ![]() The result of this function is a list of strings containing file and folder names.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |