MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

data_compression/huffman.py:7–10  ·  view source on GitHub ↗
(self, letter: str, freq: int)

Source from the content-addressed store, hash-verified

5
6class Letter:
7 def __init__(self, letter: str, freq: int):
8 self.letter: str = letter
9 self.freq: int = freq
10 self.bitstring: dict[str, str] = {}
11
12 def __repr__(self) -> str:
13 return f"{self.letter}:{self.freq}"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected