def diff_pos(string1, string2):
 for (count, c) in enumerate(string1):
  if (len(string2) <= count):
   return count
  if (string2[count] != c):
   return count

def diff_pos ( string1 , string2 ) : for ( count , c ) in enumerate ( string1 ) : if ( len ( string2 ) <= count ) : return count if ( string2 [ count ] != c ) : return count
returns first position where string1 and string2 differ .