QUESTION IMAGE
Question
question #2
dropdown
choose the character you would use in the blank for the mode described.
open (\fruit.txt\,\____\)
to write to a new file, use
to read a file, use
to add text to an existing file, use
Brief Explanations
In Python, the 'open' function takes a mode parameter. 'w' is used to write to a new file, overwriting any existing content. 'r' is used to read a file. 'a' is used to append text to an existing file.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
To write to a new file, use: w
To read a file, use: r
To add text to an existing file, use: a