May-07-2019, 09:02 PM
before you altered the function to be able to only accept 1 argument, when you passed it two arguments
Your code needs two different behaviours depending on the value of right.
if right has a value, set self.right to that value, otherwise set it to the left value.
print(interval(1,2))It would have given the result
Output:[1,2]
because right would have been set to 2.Your code needs two different behaviours depending on the value of right.
if right has a value, set self.right to that value, otherwise set it to the left value.