On Sat, 18 Feb 2017 11:55:34 -0600, boB Stepp wrote: > 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!
or simply strip the cr/lf of the end of each line -- Smell from unhygenic janitorial staff wrecked the tape heads -- https://mail.python.org/mailman/listinfo/python-list