mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
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:
parent
b22596cd96
commit
b05081a717
|
@ -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
|
||||
]
|
Loading…
Reference in New Issue
Block a user