Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-19 Thread breamoreboy
On Saturday, February 18, 2017 at 6:03:37 PM UTC, Wildman wrote: > On Sat, 18 Feb 2017 09:38:32 -0800, TTaglo 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

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread Peter Otten
TTaglo 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? I'm late to the show, but here are a few unsolicited remarks to your code. (1) The best way

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread TTaglo
Op zaterdag 18 februari 2017 18:55:46 UTC+1 schreef boB Stepp: > On Sat, Feb 18, 2017 at 11:38 AM, TTaglo 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

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread TTaglo
Op zaterdag 18 februari 2017 18:38:43 UTC+1 schreef TTaglo: > 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? > > Result: > > Other things just make you

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread Wildman via Python-list
On Sat, 18 Feb 2017 09:38:32 -0800, TTaglo 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? > > Result: > > Other things just make you swear and

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread alister
On Sat, 18 Feb 2017 11:55:34 -0600, boB Stepp wrote: > On Sat, Feb 18, 2017 at 11:38 AM, TTaglo 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

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread boB Stepp
On Sat, Feb 18, 2017 at 11:38 AM, TTaglo 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

print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread TTaglo
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? Result: Other things just make you swear and curse When you're chewing on life's gristle, don't grumble give a whistle