Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Remove space on last line [-1]
- import random;random.choice -> from random import*;choice [-1]
- {'/':'\\','<':'>','>':'<','\\':'/'} -> dict(zip("\/<>","/\><")) [-11]
- reversed -> [::-1] [-5]
- """
- # 269 bytes:
- from random import*
- m,d=[],dict(zip("\/<>","/\><"))
- v=lambda w:[d[x]for x in w]
- for e in list('=-/>/-///'):
- if e in d:f=[choice([e,d[e]])for x in[0]*12];t=''.join(f+v(f[::-1]))
- else:t=24*e
- print t;m+=[''.join(v(t)if'/'in t or'\\'in t else t)]
- print'\n'.join(m[::-1])
- """
- m+=[blah] -> m+=blah, [-1]
- v(t)if'/'in t or'\\'in t else t -> e=='/'and v(t)or t [-13]
- list('=-/>/-///') -> '=-/>/-///' [-7, no need to make a list]
- """
- # 248 bytes:
- from random import*
- m,d=[],dict(zip("\/<>","/\><"))
- v=lambda w:[d[x]for x in w]
- for e in'=-/>/-///':
- if e in d:f=[choice([e,d[e]])for x in[0]*12];t=''.join(f+v(f[::-1]))
- else:t=24*e
- print t;m+=''.join(e=='/'and v(t)or t),
- print'\n'.join(m[::-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement