Home
MCQs by exam
Python Interview File Handling
Python Interview File Handling MCQs
10 multiple choice questions typical of the Python Interview File Handling exam, with answers and explanations. Switch on practice mode to test yourself first.
A
pathlib
Correct answer
B
path
C
fs
D
filepath
A
readall()
B
get()
C
load()
D
read()
Correct answer
A
A file object
B
A dictionary
C
A JSON-formatted string
Correct answer
D
A list
A
binary
B
serialize
C
struct only
D
pickle
Correct answer
A
'w'
B
'a'
Correct answer
C
'r'
D
'x'
A
Its content is erased
Correct answer
B
It is appended to
C
It opens read-only
D
It raises an error
A
csv
Correct answer
B
excel
C
tabular
D
table
A
Parses a JSON string into a Python object
Correct answer
B
Writes JSON to a file
C
Loads a file from disk
D
Validates JSON only
A
json
Correct answer
B
jsonlib
C
simplejson only
D
pyjson
A
It makes the file faster
B
It encrypts data
C
It closes the file automatically
Correct answer
D
It locks the file permanently
Practise on paper
Test yourself
Take a timed online test and get a certificate, or play today's quick quiz.
Online tests
Daily quiz