Passed
Push — master ( 43f3d6...14c447 )
by Amresh
01:19
created

fastest.generator.byte_strings.gen_string()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
import random
2
import binascii
3
4
5
def gen_string(length=8):
6
    return '0b'+''.join([random.choice(['0', '1']) for _ in range(length)])
7