string - Python in operator looking for "night" but not counting "knight" -
this question has answer here:
- string exact match 6 answers
- regex match entire words only 3 answers
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
Post a Comment