def fmatch_iter(needle, haystack, min_ratio=0.6):
 for key in haystack:
  ratio = SequenceMatcher(None, needle, key).ratio()
  if (ratio >= min_ratio):
   (yield (ratio, key))

def fmatch_iter ( needle , haystack , min_ratio = 0.6 ) : for key in haystack : ratio = SequenceMatcher ( None , needle , key ) . ratio ( ) if ( ratio >= min_ratio ) : ( yield ( ratio , key ) )
fuzzy match: iteratively .