use fancy dict syntax
This commit is contained in:
parent
d24831a233
commit
5804ad6145
1 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
rot13_mapping = {}
|
||||
for a, b, c, d in zip("anAN05", "mzMZ49", "naNA50", "zmZM94"):
|
||||
rot13_mapping.update(dict((chr(k), chr(v))
|
||||
for k, v in zip(range(ord(a), ord(b) + 1),
|
||||
range(ord(c), ord(d) + 1))))
|
||||
rot13_mapping.update({chr(k): chr(v)
|
||||
for k, v in zip(range(ord(a), ord(b) + 1),
|
||||
range(ord(c), ord(d) + 1))})
|
||||
|
||||
|
||||
def rot13(s):
|
||||
|
|
Loading…
Reference in a new issue