Answer to Question #119353 in Python for Seth Dacha

Question #119353
Consider the following Python program.

fin = open('words.txt')
for line in fin:
word = line.strip()
print(word)

What is word?
Select one:
a. A file object
b. A list of characters
c. A list of words
d. A string that may have a newline
e. A string with no newline
1
Expert's answer
2020-05-31T16:09:47-0400

Answer : c. A list of words

Explanation : Here words contains the list of words from the line.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS