optimize ux
This commit is contained in:
11
chapter-03/binseq/binseq.py
Normal file
11
chapter-03/binseq/binseq.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from collections.abc import Callable
|
||||
|
||||
class REAL:
|
||||
def __init__(self, f: Callable[[int], str]) -> None:
|
||||
self.binseq = f
|
||||
|
||||
def as_string(self, w: int) -> str:
|
||||
s = ""
|
||||
for n in range(w):
|
||||
s += self.binseq(n)
|
||||
return s
|
||||
Reference in New Issue
Block a user