ict(a)
>>> z
{'dog': 6, 'cat': 9}
Is there any elegant way to extract the value 2? (Value corresponding to the
first occurence of 'cat' in the 2-D list).
Thanks,
Vikram
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers
Suppose i have this:
--
>>> z1 =
>>> [[34,44,'1011'],[40,60,'1011'],[50,50,'1013'],[40,20,'1011'],[10,30,'1013']]
>>> z1
[[34, 44, '1011'], [40, 60, '1011'], [50, 50, '1013'], [40, 20, '1011'], [10,
30, '1013']]
>>> for i in z1:
print i
[34, 44, '1011']
[40, 60, '1011']
[50, 50, '1013']
of an element of
X (e.g. 6741 and 6751).
Eventually, one should end up with a modified version of Y, let us say modY,
which is a filtered version of Y in which the second element of an element of
modY is contained within the second and third elements of an element of X.
Any suggestions on
> Suppose you have two nested lists, X and Y.
> A sample element of X is:
> ['NM_032291', '6741', '6751', 'chr1', '+']
>
> Another sample element of X is:
> ['NM_001097', '51183080', '51183635', 'chr22', '+']
>
>
> A sample element of Y is:
> ['chr1', '6746']
>
> Another
Suppose you have the following list:
>>> x =[['cat',10],['cat',20],['cat',30],['dog',5],['dog',1],['dog',3]]
My problem is that i wish to obtain the following two dictionaries:
xdictstart = {'cat':10, 'dog':1}
xdictend = {'cat':30, 'dog':5}
Any nice way to do the above? Thanks.
---
Those in
ere is a very good reason, write the simplest, most braindead code.
xdictstart={}
xdictend={}
for item in sorted(x):
xdictend[item[0]] = item[1]
if not item[0] in xdictstart
xdictstart[item[0]] = item[1]
On Thu, Jul 22, 2010 at 3:21 PM, Vikram wrote:
> Suppose you ha
have the following:
>>> x
[['NM100', 1, 2], ['NM100', 3, 4], ['NM200', 5, 6]]
>>> for i in x:
... print i
...
['NM100', 1, 2]
['NM100', 3, 4]
['NM200', 5, 6]
--
how does one obtain list z such that
z = [['NM100',1,2,3,4],['NM200',5,6]]
___
Bang
ul 27, 2010 at 3:16 PM, Anand Balachandran Pillai <
abpil...@gmail.com> wrote:
>
>
> On Tue, Jul 27, 2010 at 2:29 PM, Shekhar Tiwatne wrote:
>
>> On Tuesday 27 July 2010 12:18 PM, Vikram wrote:
>>
>>> have the following:
>>&g
Any suggestions on what i have to do to go from x to y?
>>> x = [['cat','NM123',12],['cat','NM234',12], ['dog', 'NM56',65]]
>>> x
[['cat', 'NM123', 12], ['cat', 'NM234', 12], ['dog', 'NM56', 65]]
>>> y = []
>>> y = [['cat','NM123, NM234', 12], ['dog', 'NM56', 65]]
>>>
Regards
Vik
email me with any questions.
Thanks,
Vikram
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers
Hi Shreyas,
Could you help conect me to Jobs with about 4 Years experience on
Scripting Languages.
With regards,
Vikram U
9916028682
On Fri, Oct 10, 2014 at 2:13 PM, Kulkarni, Shreyas wrote:
> Hi guys,
>
> We are looking for strong python and bash profiles in my team
Please unsubscribe me from the list. I've forgotten my password and am not
able to unsubscribe from the online site.
On Tue, Nov 22, 2016 at 12:00 PM, wrote:
> Send BangPypers mailing list submissions to
> bangpypers@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visi
hi all..
i am a fresher.. i have been workin on python from a few months now.. i wanted
to enquire if there are any internship programs for freshers on python in any
of the companies in india or are there any jobs for the freshers with the basic
knowledge on python.
Suppose i have this nested list:
>>> x
[['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16, 17]]
>>> for i in x:
... print i
...
['NM100', 3, 4, 5, 6, 7]
['NM100', 10, 11, 12, 13]
['NM200', 15, 16, 17]
>>>
how do i obtain from the above the following nested list:
>>> z
[['NM
Suppose i have this string:
z = 'AT/CG'
How do i get this list:
zlist = ['A','T/C','G']
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers
. Beginner help (Dennis Varkey)
> 2. Re: Beginner help (delegb...@dudupay.com)
> 3. Re: Beginner help (Senthil Kumaran)
> 4.Re: Beginner help (Vikram Kamath)
>
>
> --
>
> Message: 1
> Date: Sat, 2 Oct 20
Well, you could always try a different method of multiplication. A common
trick would be to use block multiplication.
http://en.wikipedia.org/wiki/Block_matrix
On Sun, Jan 16, 2011 at 4:30 PM, wrote:
> Send BangPypers mailing list submissions to
>bangpypers@python.org
>
> To subscribe or
>
> Message: 6
> Date: Thu, 30 Jun 2011 19:00:04 +0530
> From: Puneet Aggarwal
> To: Bangalore Python Users Group - India
> Subject: Re: [BangPypers] Spell Checker Python
> Message-ID:
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Thu, Jun 30, 2011 at 6:57 PM,
As part of a DBT sanctioned project, we need to develop a system / portal that
serves as a repository of data pertaining to the metabolism (chemical
reactions/pathways) of various species. Bio-labs all over India will use this
portal to store, access, analyze the data that comes out of their e
i am able to run the following command from the shell (i am working on Mac
Snow Leopard):
cgatools evidence2sam --beta --evidence-dnbs
evidenceDnbs-chr11-GS10026-ASM-T1.tsv.bz2 --reference build36.crr
--output CGI_10026_CLL046_chr11_NUMA1_N.sam --extract-genomic-region
chr11,71391559,71469221
20 matches
Mail list logo