I am trying to list the content of a folder using os.walk(). The function is in a page (inside the pages folder) and looks as follows:
def list_files(directory): file_list =  for root, dirs, files in os.walk(directory, topdown=False): for name in files: file_list.append(name) return file_list
The result of this is blankspace. This should not be the case as there are files inside the folder.
directory is the full file path