2. Nothing; Python sees it as one big string
3. \n or EoF
4. All of the above
What syntax would you use to open a text file to be
written to?
data = open("text.txt", "w")
data = load("text.txt", "w")
load("text.txt", "w")
open("text.txt", "w")
Which of the following do you use to write to a CSV
file in Python?
with open("text.csv", "a") as filehandle:
csv_writer = csv.write(filehandle)
csv_writer.writerow(data)
with open("text.csv", "a") as filehandle:
csv_writer.writerow(data)
with open("text.csv", "a") as filehandle:
csv_writer = csv.writer(filehandle)
csv_writer.writerow(data)
with open("text.csv", "a") as filehandle:
csv_writer = csv.writer(f)
csv_writer.writerow(data)
Which module is imported to read XML data?
xmlm
xmltodict
XMLParse
None of the above
Which methods are used for converting a native
JSON file to Python and then back to JSON?
(Choose two.)
load() and dump()
loads() and dump()
loads() and dumps()
load() and dumps()
What does YAML stand for?
Yet Another Markup Language
YAML Ain’t Markup Language
The name of its creator
None of the above
What is the syntax for error handling in Python?
try-except-else-finally
raise ErrorMessage
assertErrorValue