Given: Assume you have a following text file (sample.txt).
Line1 line2 line3 line4 line5
with open('sample.txt', 'r') as file:
data = file.read().replace('\n', ' ')
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.