@@ -25,11 +25,11 @@ def parse_file(file_path: str) -> list[Letter]:
25
25
Read the file and build a dict of all letters and their
26
26
frequencies, then convert the dict into a list of Letters.
27
27
28
- >>> file_path = 'file_to_read.txt'
29
- >>> print(open(file_path, 'r').read()) # showing content of file
30
- This is the text contained in the file
31
- >>> parse_file(file_path)
32
- [T:1, x:1, c:1, o:1, a:1, d:1, f:1, l:1, s:2, h:3, n:3, i:5, t:5, e:5, :7]
28
+ # >>> file_path = 'file_to_read.txt'
29
+ # >>> print(open(file_path, 'r').read()) # showing content of file
30
+ # This is the text contained in the file
31
+ # >>> parse_file(file_path)
32
+ # [T:1, x:1, c:1, o:1, a:1, d:1, f:1, l:1, s:2, h:3, n:3, i:5, t:5, e:5, :7]
33
33
34
34
"""
35
35
chars : dict [str , int ] = {}
@@ -98,9 +98,6 @@ def huffman(file_path: str) -> None:
98
98
# >>> print(open(file_path, 'r').read())
99
99
# This is the text contained in the file
100
100
101
- ### huffman algorithm returns dynamic encoding depending on how
102
- ### the 0s and 1s are assigned
103
-
104
101
# >>> huffman(file_path)
105
102
# Huffman Coding of file_to_read.txt:
106
103
# 00110 1101 011 0010 111 011 0010 111 100 1101 101 111 100 101 00111 \
0 commit comments