Writing contents to file in Python

Source code for writing contents to file in Python

file=open(’2.txt’,'w’)

file.write(’asdasdadas’)

file.close

Leave a comment

Your comment