Need to append something to the following code:
for subdir, dirs, files in os.walk(rootdir):
    for file in files:
        if file.endswith(".json"):
            json_files.append(os.path.join(subdir, file))
        if file.endswith(".list"):
            table_files.append(os.path.join(subdir, file))
In psuedocode, need to add an if statement like:
if a sub-directory does not contain a file that ends in ".list", 
table_files.append('')
Have tried searching but can't seem to find something that works exactly
 
    