Hi there,

I would like to search for a substring in a string and get the index of 
all occurances.

mystring = 'John has a really nice powerbook.'
substr = ' '  # space

I would like to get this list:
   [4, 8, 10, 17, 22]

How can I do that without using "for i in mystring" which might be 
expensive for large strings?

Thanks in advance,
  Nico
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to