string - Python in operator looking for "night" but not counting "knight" -


this question has answer here:

i writing program needs find word "night" in string, not word "knight". know write

if "night" in string , "knight" not in string 

but want still include strings include @ least 1 night.

later on replaces word night knight, how both fix conditional , correctly replace string "night" "knight" (even if part of word)


Comments

Popular posts from this blog

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -