mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
16 lines
406 B
Python
16 lines
406 B
Python
class Results(object):
|
|
|
|
def __init__(self):
|
|
self.results = []
|
|
|
|
def add_result(self, result):
|
|
# TODO: Clean this up
|
|
# Simplifies challenge coding and unit testing
|
|
# but makes this function look less appealing
|
|
self.results.append(int(str(result)))
|
|
|
|
def clear_results(self):
|
|
self.results = []
|
|
|
|
def __str__(self):
|
|
return str(self.results) |