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

some_programmer
  • 3,268
  • 4
  • 24
  • 59
Turkey
  • 45
  • 5

0 Answers0