binary_to_octal_adhoc
files: 0 | +0/-0
Option A: chore: Rename Bin_to_octal.py to Conversions/binary_to_octal.py(# 5981)…
Option B: Update and rename bin_to_octal.py to binary_to_octal.py ()
Which commit message is better?
Anchors: bin_stringbin_to_octal.pybinary_to_octal.pybin_string_in_3_listbin_to_octal
Diff
similarity index 96 % <nl> rename from conversions / bin_to_octal . py <nl> rename to conversions / binary_to_octal . py <nl> mmm a / conversions / bin_to_octal . py <nl> ppp b / conversions / binary_to_octal . py <nl> def bin_to_octal ( bin_string : str ) - > str : <nl> while len ( bin_string ) % 3 ! = 0 : <nl> bin_string = " 0 " + bin_string <nl> bin_string_in_3_list = [ <nl> - bin_string [ index : index + 3 ] <nl> + bin_string [ index : index + 3 ] <nl> for index , value in enumerate ( bin_string ) <nl> if index % 3 = = 0 <nl> ] <nl>