Question: Find index of list within a list based on condition

Considered a list of this type 

L:=[["O",3.85090000,0.45160000,0.00120000],
["O",−2.59990000,1.40410000,−0.00180000],
["N",−1.57050000,−0.71710000,0.00010000],
["C",−0.20660000,−0.42310000,−0.00020000],
["C",0.22050000,0.90470000,0.00040000],
["C",0.72980000,−1.45700000,−0.00070000],
["C",1.58410000,1.19860000,0.00020000],
["C",2.09330000,−1.16290000,−0.00070000],
["C",2.52040000,0.16480000,−0.00030000],
["C",−2.64850000,0.17820000,0.00090000],
["C",−3.97350000,−0.54200000,0.00100000],
["H",−0.44360000,1.75770000,0.00120000],
["H",0.41130000,−2.49630000,−0.00100000],
["H",−1.80100000,−1.70860000,0.00010000],
["H",1.90530000,2.23700000,0.00090000],
["H",2.81800000,−1.97260000,−0.00080000],
["H",−4.06550000,−1.14630000,−0.90580000],
["H",−4.79040000,0.18440000,0.02880000],
["H",−4.04450000,−1.18860000,0.88020000],
["H",3.96500000,1.41760000,0.00170000]];

Find out the indexs of the list within the list where "H" is their and to store is set S.

Here we can say 12th list have "H"

Similarly 13th list has "H" and so on

So it will output a set

{11,12,13,...}

A function which takes a list like above as input and outputs the set which give index positions of lists containing "H"

Please Wait...