Q. What is the effect of print(‘test’, file=open(‘output.txt’, ‘w’))?
Solution:
file=open(‘output.txt’, ‘w’) redirects output to the file, overwriting it.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
file=open(‘output.txt’, ‘w’) redirects output to the file, overwriting it.
Strengthen Your Practice with our comprehensive question bank.