Re: Perl to Python again

2016-03-12 Thread Fillmore
On 03/12/2016 04:40 AM, alister wrote: On Fri, 11 Mar 2016 19:15:48 -0500, Fillmore wrote: I not sure if you were being accused of being lazy as such but actually being given the suggestion that there are other places that you can find these answers that are probably better for a number of

Re: Perl to Python again

2016-03-12 Thread alister
On Fri, 11 Mar 2016 19:15:48 -0500, Fillmore wrote: > On 3/11/2016 7:12 PM, Martin A. Brown wrote: >> >> Aside from your csv question today, many of your questions could be >> answered by reading through the manual documenting the standard >> datatypes (note, I am assuming you are using Python

Re: Perl to Python again

2016-03-11 Thread Fillmore
On 3/11/2016 7:12 PM, Martin A. Brown wrote: Aside from your csv question today, many of your questions could be answered by reading through the manual documenting the standard datatypes (note, I am assuming you are using Python 3). are you accusing me of being lazy? if that's your

Re: Perl to Python again

2016-03-11 Thread Martin A. Brown
Good afternoon Fillmore, > So, now I need to split a string in a way that the first element > goes into a string and the others in a list: > > while($line = ) { > >my ($s,@values) = split /\t/,$line; > > I am trying with: > > for line in sys.stdin: >s,values = line.strip().split("\t")

Re: Perl to Python again

2016-03-11 Thread sohcahtoa82
On Friday, March 11, 2016 at 3:42:36 PM UTC-8, Fillmore wrote: > So, now I need to split a string in a way that the first element goes > into a string and the others in a list: > > while($line = ) { > > my ($s,@values) = split /\t/,$line; > > I am trying with: > > for line in sys.stdin:

Perl to Python again

2016-03-11 Thread Fillmore
So, now I need to split a string in a way that the first element goes into a string and the others in a list: while($line = ) { my ($s,@values) = split /\t/,$line; I am trying with: for line in sys.stdin: s,values = line.strip().split("\t") print(s) but no luck: ValueError: