May-06-2019, 11:22 AM
if you don't like the
else
part and don't mind to assign to self.right twice, why not simplydef __init__(self,a,b=None): self.left = a self.right = b if b is None: self.right = a
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs