f | class DivStr(str): | f | class DivStr(str): |
| | | |
| def __init__(self, args): | | def __init__(self, args): |
| super().__init__() | | super().__init__() |
| pass | | pass |
| | | |
n | def __floordiv__(self, other): | n | def __floordiv__(self, num): |
| l = len(self) // other | | l = len(self) // num |
| s = [] | | res = [] |
| for i in range(other): | | for i in range(num): |
| s.append(DivStr(self[i * l:i * l + l])) | | res.append(DivStr(self[i * l:i * l + l])) |
| return s | | return res |
| | | |
n | def __mod__(self, other): | n | def __mod__(self, num): |
| l = len(self) % other | | l = len(self) % num |
| if l == 0: | | if l == 0: |
| return DivStr('') | | return DivStr('') |
| return DivStr(self[-l:]) | | return DivStr(self[-l:]) |
| | | |
| def __getitem__(self, *args): | | def __getitem__(self, *args): |
| return DivStr(super().__getitem__(*args)) | | return DivStr(super().__getitem__(*args)) |
| | | |
| def __add__(self, *args): | | def __add__(self, *args): |
| return DivStr(super().__add__(*args)) | | return DivStr(super().__add__(*args)) |
| | | |
| def __radd__(self, *args): | | def __radd__(self, *args): |
| return DivStr(super().__radd__(*args)) | | return DivStr(super().__radd__(*args)) |
| | | |
| def __mul__(self, *args): | | def __mul__(self, *args): |
| return DivStr(super().__mul__(*args)) | | return DivStr(super().__mul__(*args)) |
| | | |
| def __rmul__(self, *args): | | def __rmul__(self, *args): |
| return DivStr(super().__rmul__(*args)) | | return DivStr(super().__rmul__(*args)) |
| | | |
| def capitalize(self, *args): | | def capitalize(self, *args): |
| return DivStr(super().capitalize(*args)) | | return DivStr(super().capitalize(*args)) |
| | | |
| def casefold(self, *args): | | def casefold(self, *args): |
| return DivStr(super().casefold(*args)) | | return DivStr(super().casefold(*args)) |
| | | |
n | | n | def center(self, *args): |
| | | return DivStr(super().center(*args)) |
| | | |
| def encode(self, *args): | | def encode(self, *args): |
| return DivStr(super().encode(*args)) | | return DivStr(super().encode(*args)) |
n | | n | |
| def center(self, *args): | | |
| return DivStr(super().center(*args)) | | |
| | | |
| def format(self, *args): | | def format(self, *args): |
| return DivStr(super().format(*args)) | | return DivStr(super().format(*args)) |
| | | |
| def format_map(self, *args): | | def format_map(self, *args): |
| return DivStr(super().format_map(*args)) | | return DivStr(super().format_map(*args)) |
| | | |
| def join(self, *args): | | def join(self, *args): |
| return DivStr(super().join(*args)) | | return DivStr(super().join(*args)) |
| | | |
| def ljust(self, *args): | | def ljust(self, *args): |
| return DivStr(super().ljust(*args)) | | return DivStr(super().ljust(*args)) |
| | | |
| def lower(self, *args): | | def lower(self, *args): |
| return DivStr(super().lower(*args)) | | return DivStr(super().lower(*args)) |
| | | |
| def lstrip(self, *args): | | def lstrip(self, *args): |
| return DivStr(super().lstrip(*args)) | | return DivStr(super().lstrip(*args)) |
| | | |
| def replace(self, *args): | | def replace(self, *args): |
| return DivStr(super().replace(*args)) | | return DivStr(super().replace(*args)) |
| | | |
| def rjust(self, *args): | | def rjust(self, *args): |
| return DivStr(super().rjust(*args)) | | return DivStr(super().rjust(*args)) |
| | | |
n | | n | def rsplit(self, *args): |
| | | return DivStr(super().rsplit(*args)) |
| | | |
| def rstrip(self, *args): | | def rstrip(self, *args): |
| return DivStr(super().rstrip(*args)) | | return DivStr(super().rstrip(*args)) |
t | | t | |
| def rsplit(self, *args): | | |
| return DivStr(super().rjust(*args)) | | |
| | | |
| def strip(self, *args): | | def strip(self, *args): |
| return DivStr(super().strip(*args)) | | return DivStr(super().strip(*args)) |
| | | |
| def swapcase(self, *args): | | def swapcase(self, *args): |
| return DivStr(super().swapcase(*args)) | | return DivStr(super().swapcase(*args)) |
| | | |
| def title(self, *args): | | def title(self, *args): |
| return DivStr(super().title(*args)) | | return DivStr(super().title(*args)) |
| | | |
| def translate(self, *args): | | def translate(self, *args): |
| return DivStr(super().translate(*args)) | | return DivStr(super().translate(*args)) |
| | | |
| def upper(self, *args): | | def upper(self, *args): |
| return DivStr(super().upper(*args)) | | return DivStr(super().upper(*args)) |
| | | |
| def zfill(self, *args): | | def zfill(self, *args): |
| return DivStr(super().zfill(*args)) | | return DivStr(super().zfill(*args)) |
| | | |
| def removeprefix(self, *args): | | def removeprefix(self, *args): |
| return DivStr(super().removeprefix(*args)) | | return DivStr(super().removeprefix(*args)) |
| | | |
| def removesuffix(self, *args): | | def removesuffix(self, *args): |
| return DivStr(super().removesuffix(*args)) | | return DivStr(super().removesuffix(*args)) |