So say i had some text like this:
line num 1
line num 2
line num 3
line num 4
I am trying to get rid of all the new lines in between line 2 and 3 and line 3 and 4 while having all of the line num on separate new lines. How would i accomplish this? I have already tried puth=ing them into a list then looping throught them and taking out all of the lone
页: 1
obj=[ line num 1 , line num 2 ,
, line num 3 ,
,
, line num4 ]
a=-1
for i in obj:
a+=1
if i==
:
print yes
del obj[a]
print obj
产出:
[ line num 1 , line num 2 , line num 3 ,
, line num4 ]
它收集了一些但并非全部。