comefrom: <doocs>1496.Path Crossing_1.py
code: def isPathCrossing( path: str) -> bool:
      x = y = 0
      vis = {(x, y)}
      for c in path:
          if c == 'N':
              y += 1
          elif c == 'S':
              y -= 1
          elif c == 'E':
              x += 1
          else:
              x -= 1
          if (x, y) in vis:
              return True
          vis.add((x, y))
      return False
masked: def sample_funcname ( var_0 : str ) -> bool :
      var_5 = var_3 = 0
      var_6 = { ( var_5 , var_3 ) }
      for var_7 in var_0 :
          if var_7 == 'N' :
              var_3 += 1
          elif var_7 == 'S' :
              var_3 -= 1
          elif var_7 == 'E' :
              var_5 += 1
          else :
              var_5 -= 1
          if ( var_5 , var_3 ) in var_6 :
              return True
          var_6.add ( ( var_5 , var_3 ) )
      return False
  