I am C programmer. I am new to python. In C , when we define the structure of a binary tree node we assign NULL to it's right and left child as :
struct node
{
int val;
struct node *right ;
struct node *left ;
};
And when initializing a node , we write as :
val = some_value
right = NULL;
left = NULL;
Now my question is: how can we assign a NULL value to right and left pointers of the node in Python?
And how can we test against the Python version of NULL ? In C it would be:
if( ptr->right == NULL )
Thank you!