Advertisement
Guest User

messy

a guest
Mar 17th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import re
  2. from itertools import izip_longest
  3.  
  4. def blah():
  5. blueprint = raw_input()
  6. build_list = re.findall(r'[1-9][a-j]|[a-j]', blueprint)
  7. reference = "abcdefghij"
  8. material = "++--***..."
  9.  
  10. final = []
  11. for d in build_list:
  12. if d[0] in "123456789":
  13. final.append(list(" " * int(d[0]) + material[0:reference.index(d[1])+1]))
  14. else:
  15. final.append(list(material[0:reference.index(d[0])+1]))
  16.  
  17. for sublist in zip(*[list(n) for n in zip(*[list(tuple) for tuple in list(izip_longest(*final, fillvalue = " "))])])[::-1]:
  18. print "".join(sublist)
  19.  
  20. while True:
  21. blah()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement