<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Delete leaf nodes with value as x
A utility class to allocate a new node ; deleteleaves ( ) ; inorder ( ) ; Driver Code

<ASSISTANT_TASK:>
Python Code:
class newNode : 
	 def __init__(self , data ) : 
	 self . data = data 
 self . left = self . right = None 
   def deleteLeaves(root , x ) : 
	 if(root == None ) : 
	 return None 
  root . left = deleteLeaves(root . left , x ) 
 root . right = deleteLeaves(root . right , x ) 
 if(root . data == x and root . left == None and root . right == None ) : 
	 return None 
  return root 
  def inorder(root ) : 
	 if(root == None ) : 
	 return 
  inorder(root . left ) 
 print(root . data , end = "▁ ") 
 inorder(root . right ) 
  if __name__== ' __main __' : 
	 root = newNode(10 ) 
 root . left = newNode(3 ) 
 root . right = newNode(10 ) 
 root . left . left = newNode(3 ) 
 root . left . right = newNode(1 ) 
 root . right . right = newNode(3 ) 
 root . right . right . left = newNode(3 ) 
 root . right . right . right = newNode(3 ) 
 deleteLeaves(root , 3 ) 
 print("Inorder ▁ traversal ▁ after ▁ deletion ▁ : ▁ ") 
 inorder(root ) 
 
<END_TASK>
