Soroban Fixed by croyal

s=raw_input()
r=[]
i=1
r=['='*(len(s)*3)]
r+=['']
for c in s:
 if int(c)<5:r[i]+='<->'
 else:r[i]+=' | '
i+=1
r+=['']
for c in s:
 if int(c)<5:r[i]+=' | '
 else:r[i]+='<->'
l=''
for k in range(len(s)):
 if k%4==0:l='=*='+l
 else:l='='*3+l
i+=1
r+=[l]

for j in range(0,5):
 i+=1
 r+=['']
 for c in s:
  if int(c)==j or int(c)==(j+5)%10:r[i]+=' | '
  else:r[i]+='<->'
r+=['='*(len(s)*3)]
for l in r:print l   

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top