result = 0

def add(num):
    global result
    result += num
    return result

print(add(3))
print(add(4))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: