A student wants to write into a file called myfile, without deleting its existing content. Which one of the following functions should he or she use?   f = open('myfile', 'r') f = open('myfile', 'w+b') f = open('myfile', '+') f = open('myfile', 'a')

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 16RQ
icon
Related questions
Question
A student wants to write into a file called myfile, without deleting its existing content. Which one of the following functions should he or she use?
 
  1. f = open('myfile', 'r')
  2. f = open('myfile', 'w+b')
  3. f = open('myfile', '+')
  4. f = open('myfile', 'a')
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,