Created
July 30, 2021 17:09
-
-
Save betodealmeida/ad5b11cdd893dbbaeaaf49f33d6a68cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def is_prime(n): | |
return not re.match(r'^.?$|^(..+?)\1+$', '1'*n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment