I have a class which takes two numbers and prints them in a list
class Numbers():
def __init__(self, l, r):
self.l = l
self.r = r
def __str__(self):
print([self.l, self.r])
ex:
N = Numbers(1, 3) #[1, 3]
Now, I need to extend the class so that it can be initialized with only one value
N2 = Numbers(2) #[2, 2]
Right now I'm a bit clueless on how to proceed, any help is appreciated