python common substring in two string code example Example: find common string in two strings python for i in str1: if i in str2: return "TRUE"