find_position(s, sub) that returns the index of the first occurrence of sub in s, or -1 if sub does not appear at all.s = 'hello world', sub = 'world'
6
'world' starts at index 6.
s = 'hello world', sub = 'xyz'
-1
No match found.
`str.find()` does exactly this and returns -1 on failure (unlike `str.index()`, which raises).