You can still use find if you want, find first position of | and next one:
fullstr = "my|name|is|will"
begin = fullstr.find('|')+1
end = fullstr.find('|', begin)
print fullstr[begin:end]
Similar way using index:
fullstr = "my|name|is|will"
begin = fullstr.index('|')+1
end = fullstr.index('|', begin)
print fullstr[begin:end]
Another way is to find all occurrences of | in your string using re.finditer and slice it by indexes:
import re
all = [sub.start() for sub in re.finditer('\|', fullstr)]
print fullstr[all[0]+1:all[1]]
You can also take a look into re.search:
import re
fullstr = "my|name|is|will"
print re.search(r'\|([a-z]+)\|', fullstr).group(1)
There is an interesting way using enumerate:
fullstr = "my|name|is|will"
all = [p for p, e in enumerate(fullstr) if e == '|']
print fullstr[all[0]+1:all[1]]
And the easiest way just using split or rsplit:
fullstr = "my|name|is|will"
fullstr.split('|')[1]
fullstr.rsplit('|')[1]
"|", then simply usesullstr.split("|"), which would result in["my", "name", "is", "will"]