str = 'ola mundo string python 3 teste -_ outras strings' search = 'python' start = str.find(search) end = str.find('-_') print str[start:end]