I’m trying to convert a longish hollow “data” class into a named tuple. My class currently looks like this:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
After conversion to namedtuple it looks like:
from collections import namedtuple
Node = named….