Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ __len__
Method
__len__
data_structures/binary_tree/basic_binary_tree.py:38–39 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
36
return
iter(self.root)
37
38
def
__len__(self) -> int:
39
return
len(self.root)
40
41
@classmethod
42
def
small_tree(cls) -> BinaryTree:
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected