I've got a txt file(answer.txt), and I read all the lines into a list, one line is one element. And this lines look like:
'ABC3 ASLS43'
and I'd like to cut it like:
'ABC3'
'ASLS43'
Do you have any idea about it? I think It has a simple answer, but I'm a beginner, and I couldn't find anything 'bout it.
The code:
person=[]
with open('answer.txt', 'r') as v:
ps=sum(1 for line in open('answer.txt'))
print(ps)
for i in range(0, ps):
person.append(v.readline().strip()) #read line by line