read a text file line by line and display each word seperated by a #
Answers
Answered by
2
with open("file.txt") as f:
for line in f:
new_words = [word + "#" for word in line.split()]
print("".join(new_words))
Similar questions
Science,
3 months ago
Science,
3 months ago
Sociology,
3 months ago
Social Sciences,
6 months ago
Math,
6 months ago
Social Sciences,
11 months ago
Physics,
11 months ago
English,
11 months ago