On Sat, Feb 18, 2017 at 11:38 AM, TTaglo <tfe...@gmail.com> wrote: > i = 1 > f = open ('rosalind_ini5(1).txt') > for line in f.readlines(): > if i % 2 == 0: > print line > i += 1 > > > How do i get output without breaks between the lines?
If you use "print line," (Note the trailing comma.), this should suppress the line break that the print statement normally inserts. Another suggestion might be to use enumerate() instead of using a manual counter in your for loop. HTH! -- boB -- https://mail.python.org/mailman/listinfo/python-list