title: In Python, how do I check a string to see if any combinations of another string are in it?
body: <p>I have a 170 000 list of words and I am writing an algorithms using a graph for each word to see the longest word chain possible;</p>
  
  <p>Word chain being a list of words where the i-th word is the (i − 1)st word with one extra character and the other characters are arranged in any manner</p>
  
  <p>A -> AN -> CAN -> CANE</p>
  
  <p>Right now I have all the words listed alphabetically like CAT = ACT</p>
  
  <p>and I say add an edge when String 2 contains string 1, plus one other character</p>
  
  <p>However in the case of </p>
  
  <p>A-> AT -> ACT</p>
  
  <p>the edge between AT and ACT isn't drawn because the C split the A and the T and my if statement only works if "AT" was found.</p>
  
  <p>How do I tell python to search a string so that the order of the characters do not matter?</p>