zen of python source code

Solutions on MaxInterview for zen of python source code by the best coders in the world

showing results for - "zen of python source code"
Martín
30 Aug 2016
1s = """Gur Mra bs Clguba, ol Gvz Crgref
2
3Ornhgvshy vf orggre guna htyl.
4Rkcyvpvg vf orggre guna vzcyvpvg.
5Fvzcyr vf orggre guna pbzcyrk.
6Pbzcyrk vf orggre guna pbzcyvpngrq.
7Syng vf orggre guna arfgrq.
8Fcnefr vf orggre guna qrafr.
9Ernqnovyvgl pbhagf.
10Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf.
11Nygubhtu cenpgvpnyvgl orngf chevgl.
12Reebef fubhyq arire cnff fvyragyl.
13Hayrff rkcyvpvgyl fvyraprq.
14Va gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.
15Gurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.
16Nygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh'er Qhgpu.
17Abj vf orggre guna arire.
18Nygubhtu arire vf bsgra orggre guna *evtug* abj.
19Vs gur vzcyrzragngvba vf uneq gb rkcynva, vg'f n onq vqrn.
20Vs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.
21Anzrfcnprf ner bar ubaxvat terng vqrn -- yrg'f qb zber bs gubfr!"""
22
23d = {}
24for c in (65, 97):
25    for i in range(26):
26        d[chr(i+c)] = chr((i+13) % 26 + c)
27
28print "".join([d.get(c, c) for c in s])
queries leading to this page
this pyzen of python source code