index(x)
kuntzagk at sulawesi.bioinf.mdc-berlin.de
kuntzagk at sulawesi.bioinf.mdc-berlin.de
Thu Jun 12 10:29:12 EDT 2003
>
> I would do it like this:
> s="..a....a...a.a"
> indexes=[]
Or using list comprehension:
indexes = [i for i in range(0,len(s)) if s[i]=="a"]
More information about the Python-list
mailing list