>> s[i:j] == t >Maybe you want something like: t in s No. This is not currently legal, though probably will be in 2.3. Anyway, asking if t is *anywhere* is s (megabytes in len) is *much* more general than asking if it is at a specific location. TJR