CCing the list. Please use Reply All when responding.
> thanks Alan, i understand now zero is False.
That's right. but...
> so if one of the 'if' test is false, that 'for' loop is also halted?
> and does not proceed to the next element?
This bit is wrong.
The for loop will continue to comp
Alan,
roger that and thanks a bunch. now replying with reply all, i am a super
noob and thanks for the kind adivce
On Tue, Feb 11, 2014 at 10:31 AM, ALAN GAULD wrote:
> CCing the list. Please use Reply All when responding.
>
> > thanks Alan, i understand now zero is False.
>
> That's right. but
CCing Tutor list.
here are the entire code
>
>
>import sys
>in_file = open(sys.argv[1], 'r').readlines()
>locus = ''
>accession = ''
>organism = ''
>
>OK, as suspected you initialise these to empty strings so they almost
>certainly
are being printed they just don't contain anything. Its easily
On 10/02/14 15:32, rahmad akbar wrote:
hey again guys, i am trying to understand these statements,
if i do it like this, it will only print the 'print locus' part
for element in in_file:
if element.find('LOCUS'):
locus += element
The only time this is not executed is if LOCUS is at th
On Feb 10, 2014 10:33 AM, "rahmad akbar" wrote:
>
> hey again guys, i am trying to understand these statements,
>
> if i do it like this, it will only print the 'print locus' part
>
> for element in in_file:
# do this
print element
> if element.find('LOCUS'):
> locus += element
>
rahmad akbar wrote:
> hey again guys, i am trying to understand these statements,
>
> if i do it like this, it will only print the 'print locus' part
>
> for element in in_file:
> if element.find('LOCUS'):
> locus += element
> elif element.find('ACCESSION'):
> accession += element
>
hey again guys, i am trying to understand these statements,
if i do it like this, it will only print the 'print locus' part
for element in in_file:
if element.find('LOCUS'):
locus += element
elif element.find('ACCESSION'):
accession += element
elif element.find('ORGANISM'):
orga