[Baypiggies] history of import this
Eric Walstad
eric at ericwalstad.com
Fri Jun 11 04:46:02 CEST 2010
On Thu, Jun 10, 2010 at 7:01 PM, Keith Dart <keith at dartworks.biz> wrote:
> === On Thu, 06/10, akleider at sonic.net wrote: ===
>> What syntax would one use to capture the string that gets printed
>> when one
>> >>> import this
>> ????
Why not just decode the rot13 string in the this module?
def mra_bs_clguba():
"""Ergheaf gur Mra bs Clguba"""
from this import s
d = {}
for c in (65, 97):
for i in range(26):
d[chr(i+c)] = chr((i+13) % 26 + c)
return "".join([d.get(c, c) for c in s])
if __name__ == '__main__':
print(mra_bs_clguba())
Eric.
More information about the Baypiggies
mailing list