print
adds a newline. Strip the newline from the line:
print lines[0].rstrip('\n')
print lines[1].rstrip('\n')
print lines[2].rstrip('\n')
If you are reading the whole file into a list anyway, an alternative would be to use str.splitlines()
:
lines = file.read().splitlines()
which by default removes the newlines from the lines at the same time.