SyntaxFix
Write A Post
Hire A Developer
Questions
You should actually create a class:
class accum: def __init__(self): self.acc = 0 def accumulator(self, var2add, end): if not end: self.acc+=var2add return self.acc