i'm new to python and i'm trying read every line of a simple txt file, but when print out the result in the terminal, between every line there is an empty line that in the txt file doesn't exist and i have use strip() method to avoid that line, this is the code:
ins = open( "abc.txt", "r" )
array = []
for line in ins:
array.append( line )
ins.close()
for riga in array:
if line.strip() != '':
print riga
this is the txt file:
a
b
c
and this is the result in the terminal:
a
b
c
i can't understand why create that empty line between a,b,c, any idea?