Updated repr/str

This commit is contained in:
SimpleArt
2020-11-16 20:51:09 -05:00
parent 2efebc4bcd
commit 0d8fb6147c
3 changed files with 14 additions and 19 deletions

View File

@ -29,5 +29,10 @@ class Gene:
def __repr__(self):
"""Format the repr() output value"""
return f'[{self.value}]'
"""Create a backend string of the chromosome. Ex '1'."""
return str(self.value)
def __str__(self):
"""Create a printable string of the chromosome. Ex '[1]'."""
return f'[{str(self.value)}]'