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.

Fill in the gaps with the relevant elements

open(, '') as :
f.write('Tada!')
f.close()

Create a free account to access the full topic