Update and rename bin_to_octal.py to binary_to_octal.py (#2449)

* Update and rename bin_to_octal.py to binary_to_octal.py

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss 2020-09-19 08:58:08 +02:00 committed by GitHub
parent b22596cd96
commit b05081a717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ def bin_to_octal(bin_string: str) -> str:
while len(bin_string) % 3 != 0:
bin_string = "0" + bin_string
bin_string_in_3_list = [
bin_string[index: index + 3]
bin_string[index : index + 3]
for index, value in enumerate(bin_string)
if index % 3 == 0
]