Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Open_Write_File_CharSet(FileName,CharSet):####
- return open(FileName,"w",CharSet)
- def Write_In_File(File, Linea):####
- File.write(Linea)
- def Close_Write_File( File):
- File.close
- o = Open_Write_File_CharSet('demo.txt',1)
- Write_In_File(o,'this is a new line')
- Close_Write_File(o)
- # Alternativa 1
- o = open('demo.txt', 'w')
- o.write('this is a new line')
- o.close
- # Alternativa 2
- with open('demo2.txt','w') as o:
- o.write('this is a new line')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement