A fast way to check is_prime (python)
python\ndef is_prime(n):\n            if n < 2:\n                return False\n            if n in [2, 3]:\n                return True\n            if n % 6 !=
```python\ndef is_prime(n):\n            if n < 2:\n                return False\n            if n in [2, 3]:\n                return True\n            if n % 6 != 5 and n % 6 != 1:\n                return False\n            for i in range(5, int(math.sqrt(n)) + 1, 6):\n                if (n % i == 0) or (n % (i + 2) == 0):\n                    return False\n            return True\n```
[]