1

Say i've got a text file which contains the lines:

ABCD

E  F

GHIJ

How would I add each line into an empty list so the list would be:

ls = ["ABCD", "E  F", "GHIJ"]

The spaces between E and F are included

Junkrat
  • 2,754
  • 3
  • 19
  • 39
Turkey
  • 45
  • 4

0 Answers0