DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
Take input of any number and generate all possible binary strings without recursion
n = 5 for i in range(2**n, 2**(n+1)): print(bin(i)[3:])
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Take
#input
#number
#generate
#binary
#strings
#recursion
ADD COMMENT
Topic
COMMENT
Name
1+9 =
Submit