<jupyter_start><jupyter_text>All the IPython Notebooks in this **Python Examples** series by Dr. <NAME> are available @ **[GitHub](https://github.com/milaan9/90_Python_Examples)**  Python Program to Append to a FileIn this example, you will learn to append to a file.To understand this example, you should have the knowledge of the following **[Python programming](https://github.com/milaan9/01_Python_Introduction/blob/main/000_Intro_to_Python.ipynb)** topics:* **[Python File I/O](https://github.com/milaan9/05_Python_Files/blob/main/001_Python_File_Input_Output.ipynb)** Let the content of the file **`vaccine_data.txt`** be:```Small-Pox Edward-Jenner England-1796Cholera Louis-Pasteur France-1880Polio Jones-Salk US-1952```  Open file in append mode and write to it<jupyter_code># Example 1: 

with open("vaccine_data.txt", "a") as f:
    f.write("new_text")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12443946188340807, 'fraction_numerical': 0.03139013452914798, 'mean_word_length': 6.144, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '205913', 'license': 'MIT', 'n_tokens_mistral': 326, 'n_tokens_neox': 291, 'n_words': 80, 'path': '05_Python_Files_examples/008_append_to_a_file/008_append_to_a_file.ipynb', 'repo_name': 'peterennis/90_Python_Examples', 'size': '899'}