Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

print to file python

print('Hi', file=open('output.txt', 'a'))
print('Hello from AskPython', file=open('output.txt', 'a'))
print('exit', file=open('output.txt', 'a'))
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #print #file #python
ADD COMMENT
Topic
Name
1+6 =