mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-19 21:19:47 +00:00
added a docstring
This commit is contained in:
parent
cfae621f46
commit
0494d48f84
@ -2,6 +2,19 @@ from __future__ import print_function
|
||||
import math
|
||||
|
||||
def rearrange(bitString32):
|
||||
"""[summary]
|
||||
Regroups the given binary string.
|
||||
|
||||
Arguments:
|
||||
bitString32 {[string]} -- [32 bit binary]
|
||||
|
||||
Raises:
|
||||
ValueError -- [if the given string not are 32 bit binary string]
|
||||
|
||||
Returns:
|
||||
[string] -- [32 bit binary string]
|
||||
"""
|
||||
|
||||
if len(bitString32) != 32:
|
||||
raise ValueError("Need length 32")
|
||||
newString = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user