Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

can you print to multiple output files python

# Python 3
outputFile1 = open('text.txt', 'w')
outputFile2 = open('text2.txt'. 'w')

print('Hello World', file=outputFile1)
print('Hello World 2', file=outputFile2)
Source by www.pylenin.com #
 
PREVIOUS NEXT
Tagged: #print #multiple #output #files #python
ADD COMMENT
Topic
Name
1+7 =