subject

The function takes a single parameter: the name of a file. The function should read the file into a list, where each line is an element in the list with the newline character removed, and then return the list. Can you fix it? def read_file_as_list(filename):
fpoint = open(filename)
my_list = []
for data in fpoint. read():
my_list. append(data)
return data

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, michael3592
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, kieante01
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
image
Computers and Technology, 23.06.2019 15:10, cathyjuan
What role did women fill during world war ii?
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, RG1971
(, urgent need): how do i change my username
Answers: 1
You know the right answer?
The function takes a single parameter: the name of a file. The function should read the file into a...

Questions in other subjects: