<jupyter_start><jupyter_text><jupyter_code>%%writefile test.txt
 
Hi, I am <NAME>. I am from punjab
 # opening file in read mode and tring to write 
 
try:
    
    file = open("test.txt","r")
    
    file.write("I waana learn hacking")
    
    print("\nWrite operation has done successfully in read only mode.")
    
except Exception as e:
    
    print("\nError has been occured")
    
    print("\nError message is :",e)<jupyter_output>Error has been occured

Error message is : not writable
{'fraction_non_alphanumeric': 0.10261569416498995, 'fraction_numerical': 0.0, 'mean_word_length': 3.048780487804878, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '440148', 'license': 'Apache-2.0', 'n_tokens_mistral': 166, 'n_tokens_neox': 159, 'n_words': 55, 'path': 'Day8_Question2.ipynb', 'repo_name': 'sssinghsimran7/Day-8', 'size': '503'}