Skip to content

Instantly share code, notes, and snippets.

Building stuff

Mo Hajr MohamedHajr

Building stuff
View GitHub Profile
MohamedHajr /
Last active Feb 20, 2019
String Builder in python
class StringBuilder(object):
def __init__(self, val): = [val]
def __iadd__(self, value):
return self
def __str__(self):
return "".join(
View is_prime
def is_prime(*, number: int):
stop = int(math.sqrt(number)) + 1
return all(number % divisor != 0 for divisor in range(2, stop))
You can’t perform that action at this time.