parameters: (self, s1, s2)
return_statement: return (x1//2 + y1//2) + (x1%2 + y1%2)
docstring: :type s1: str
          :type s2: str
          :rtype: int
docstring_summary: :type s1: str
          :type s2: str
          :rtype: int
docstring_tokens: : type s1 : str : type s2 : str : rtype : int
function: def minimumSwap(self, s1, s2):
          """
          :type s1: str
          :type s2: str
          :rtype: int
          """
          x1, y1 = 0, 0
          for i in xrange(len(s1)):
              if s1[i] == s2[i]:
                  continue
              x1 += int(s1[i] == 'x')
              y1 += int(s1[i] == 'y')
          if x1%2 !=  y1%2:  # impossible
              return -1
          # case1: per xx or yy needs one swap, (x1//2 + y1//2) 
          # case2: per xy or yx needs two swaps, (x1%2 + y1%2)
          return (x1//2 + y1//2) + (x1%2 + y1%2)
function_tokens: def minimumSwap ( self , s1 , s2 ) : x1 , y1 = 0 , 0 for i in xrange ( len ( s1 ) ) : if s1 [ i ] == s2 [ i ] : continue x1 += int ( s1 [ i ] == 'x' ) y1 += int ( s1 [ i ] == 'y' ) if x1 % 2 != y1 % 2 : # impossible return - 1 # case1: per xx or yy needs one swap, (x1//2 + y1//2)  # case2: per xy or yx needs two swaps, (x1%2 + y1%2) return ( x1 // 2 + y1 // 2 ) + ( x1 % 2 + y1 % 2 )