Quiz: Create a Word Counter
1
#!/usr/bin/python
f = open("birds.txt", "r")
data = X
f.close()
print(data)
X
reads the entire content of a file. Which of the following functions will replace X
in the code above.
A)
f.reads()
B)
f.read()
C)
f.readall()
D)
f.read(*)
Question 1 of 50 attempted
Get hands-on with 1400+ tech skills courses.