Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ __len__
Method
__len__
data_structures/binary_tree/mirror_binary_tree.py:30–31 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
28
yield
from
self.right
29
30
def
__len__(self) -> int:
31
return
sum(1
for
_ in self)
32
33
def
mirror(self) -> Node:
34
""
"
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected