repl.it
@anonymous/

VeneratedLeafyWhippoorwill

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
import re
b='><+-.,[]'
i=re.sub('[^01]','',input())
n=[int(j,2)for j in re.findall('.'*4,i)]
k=0;o=''
while k<len(n):
	c=n[k]
	if c<8:o+=b[c]
	elif c<10:o+=n[k+1]*('+'if c<9 else'-');k+=1
	else:o+='[-]'
	k+=1
print o
?