Dear Kent and Bob,
thank you for your solutions. It helped, however,
based on your suggestions, I intended to solve a
chromosome walking problem. I posted my question on
subject name:
'Limitation of range() function in Walking problem'.
Thanks again.
Sri
--- Kent Johnson <[EMAIL PROTECTED]> wro
Srinivas Iyyer wrote:
> Thank you Bob for your email.
> Sorry for the confusion.
> here is what I ment:
>
> test = ['10\t15', '16\t20', '25\t35', '45\t50',
> '55\t60', '61\t65', '75\t80']
>>> I would get:
>>> 10 20
>>> 25 35
>>> 45 50
>>> 55 65
>>> 75 80
Here is my take
try this:
>>> test = ['10\t15', '16\t20', '25\t35', '45\t50','55\t60', '61\t65',
'75\t80']
>>> t='\t'.join(test).split('\t')
>>> t
['10', '15', '16', '20', '25', '35', '45', '50', '55', '60', '61', '65',
'75', '80']
>>> t2=[int(i) for i in t]
>>> t2
[10, 15, 16, 20, 25, 35, 45, 50, 55, 60,
Thank you Bob for your email.
Sorry for the confusion.
here is what I ment:
test = ['10\t15', '16\t20', '25\t35', '45\t50',
'55\t60', '61\t65', '75\t80']
>>> x = []
>>> y = []
>>> for m in test:
... cols = m.split('\t')
... x.append(cols[0])
... y.append(cols[1])
...
>>> x
['10', '
Srinivas Iyyer wrote:
> Dear group:
>
> I have a data like this:
> 10 15
> 16 20
> 25 35
> 45 50
> 55 60
> 61 65
> 75 80
>
> Since 15 precedes 16, I want to consider 10:20 as one
> unit. If I repeat completely for data
>
> I would get:
> 10 20
> 25 35
>
Dear group:
I have a data like this:
10 15
16 20
25 35
45 50
55 60
61 65
75 80
Since 15 precedes 16, I want to consider 10:20 as one
unit. If I repeat completely for data
I would get:
10 20
25 35
45 50
55 65
75 80
test = ['10\t15', '1