Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to write a file in python

with open(file_path+file_name*, 'wb') as a:
    a.write(content)
    
# *example: r"C:UsersuserDesktophello_world.docx".
# 'hello_world' DOENT EXIST at the moment, python will automatically create it for us
Source by www.pythonforbeginners.com #
 
PREVIOUS NEXT
Tagged: #write #file #python
ADD COMMENT
Topic
Name
4+9 =