Drkcore

12 01 2010 Python Tweet

pythonのthisは暗号化が施されていた

import thisとやるとThe Zen of Pythonがずらずらっと表示されるわけだけど、ソースのぞいたらカエサル暗号が施されていた。

d = {}
for c in (65, 97):
    for i in range(26):
        d[chr(i+c)] = chr((i+13) % 26 + c)

print "".join([d.get(c, c) for c in s])

"Abj vf orggre guna arire."

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021