Rewrite

Report a typo

Rewrite the following code using the with keyword:

f = open('test.txt', 'w')
f.write('Tada!')
f.close()

Please open a context manager with the name f.

Write a program in Python 3





___

Create a free account to access the full topic