Python - Context Managers
Find the bug in this code:
with open('log.txt', 'w') as f:
print('Writing to file')
f.write('Log entry')with open('log.txt', 'w') as f:
print('Writing to file')
f.write('Log entry')15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions