with open('file_name.txt', 'w') as file:
    for k, v in list(dictionary.items()):
        dictionary_content = k + ': ' + v + '\n'
file.write(dictionary_content)
How to save a dictionary to a file with key values one per line?