week6/questions/questions.py
def load_files(directory):
    """
    Given a directory name, return a dictionary mapping the filename of each
    `.txt` file inside that directory to the file's contents as a string.
    """
    file_content = dict()
    for filename in os.listdir(directory):
        file = open(os.path.join(directory, filename), "r")
        file_content[filename] = file.read()

    return file_content

    Given a directory name, return a dictionary mapping the filename of each
    `.txt` file inside that directory to the file's contents as a string.
    
Given a directory name, return a dictionary mapping the filename of each
`.txt` file inside that directory to the file's contents as a string.
Given a directory name return a dictionary mapping the filename of each ` . txt ` file inside that directory to the file ' s contents as a string .
def load_files(directory):
    file_content = dict()
    for filename in os.listdir(directory):
        file = open(os.path.join(directory, filename), "r")
        file_content[filename] = file.read()
    return file_content
def load_files ( directory ) : file_content = dict ( ) for filename in os . listdir ( directory ) : file = open ( os . path . join ( directory , filename ) , "r" ) file_content [ filename ] = file . read ( ) return file_content
Given a directory name, return a dictionary mapping the filename of each
`.txt` file inside that directory to the file's contents as a string.
Given a directory name return a dictionary mapping the filename of each ` . txt ` file inside that directory to the file ' s contents as a string .
"""
    Given a directory name, return a dictionary mapping the filename of each
    `.txt` file inside that directory to the file's contents as a string.
    """
directory