Python useful solution
This is not a very efficace solution. Because it use evalfunction.\nIn fact I wrote a function to help me find all solutions for 24 game.\nEfficacy was not that
This is not a very efficace solution. Because it use ```eval```function.\nIn fact I wrote a function to help me find all solutions for 24 game.\nEfficacy was not that important. Then I met this problem I just modified my original solution to return just ```True``` or ```False```\n\n\n````\n    def judgePoint24(self, nums):\n        def f(s1, s2):\n            res = []\n            for a in s1:\n                for b in s2:\n                    res.append('(' + a + '+' + b + ')')\n                    res.append('(' + a + '-' + b + ')')\n                    res.append('(' + b + '-' + a + ')')\n                    res.append(a + '*' + b)\n                    res.append(a + '/' + b)\n                    res.append(b + '/' + a)\n            return res\n\n        nums = [str(float(i)) for i in nums]\n        for c in itertools.permutations(nums):\n            eq1 = f(f(f([c[0]], [c[1]]), [c[2]]), [c[3]])\n            eq2 = f(f([c[0]], [c[1]]), f([c[2]], [c[3]]))\n            for eq in eq1 + eq2:\n                try:\n                    if 23.9 <= eval(eq) <= 24.1:\n                        print eq.replace(".0", "")\n                        return True\n                except:\n                    pass\n        return False
[]