Which of the following is the correct way to open a file named users.txt in 'r' mode?
A) infile = open('r', users.txt)
B) infile = read('users.txt', 'r')
C) infile = open('users.txt', 'r')
D) infile = readlines('users.txt', r)
Correct Answer:
Verified
Q21: Which statement can be used to handle
Q22: What will be the output after the
Q23: If data is retrieved from a file
Q24: When a program needs to save data
Q25: Which method could be used to strip
Q27: When data is written to a file,it
Q28: A(n)_ gives information about the line number(s)that
Q29: Programmers usually refer to the process of
Q30: A(n)_ block includes one or more statements
Q31: A(n)_ file contains data that has not
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents