Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- from itertools import izip_longest
- def blah():
- blueprint = raw_input()
- build_list = re.findall(r'[1-9][a-j]|[a-j]', blueprint)
- reference = "abcdefghij"
- material = "++--***..."
- final = []
- for d in build_list:
- if d[0] in "123456789":
- final.append(list(" " * int(d[0]) + material[0:reference.index(d[1])+1]))
- else:
- final.append(list(material[0:reference.index(d[0])+1]))
- for sublist in zip(*[list(n) for n in zip(*[list(tuple) for tuple in list(izip_longest(*final, fillvalue = " "))])])[::-1]:
- print "".join(sublist)
- while True:
- blah()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement