Python - Context Managers
Identify the error in this code snippet:
with open('log.txt', 'w') as file
file.write('Log start')with open('log.txt', 'w') as file
file.write('Log start')with statement requires a colon at the end of the line.as file, causing a syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions