Python 2d Array Check If Element In Set