#writing to a file named 'test.txt' using with
with open('test.txt','w')as local_towrite:
    local_towrite.write('I LOVE CODING IN PYTHON')
#becareful about the giving the file name, you have to give the path clearly
#writing to a file means rewriting the previous data of the file with the given data
