Skip to content

Instantly share code, notes, and snippets.

View Blezzoh's full-sized avatar

Blaise Iradukunda Blezzoh

View GitHub Profile
@kernelshreyak
kernelshreyak / tree.py
Last active November 10, 2024 15:26
Implementation of a generic tree data structure in Python
#Implementation of generic tree in Python
import random
import string
import pptree
class TreeNode(object):
"Node of a Tree"
def __init__(self, name='root', children=None,parent=None):
self.name = name