Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- trd = {1:"h", 2:"he", 3:"li", 4:"be", 5:"b", 6:"c", 7:"n", 8:"o", 9:"f", 10:"ne", 11:"na", 12:"mg",
- 13:"al", 14:"si", 15:"p", 16:"s", 17:"cl", 18:"ar", 19:"k", 20:"ca", 21:"sc",
- 22:"ti", 23:"v", 24:"cr", 25:"mn", 26:"fe"}
- def trl(l):
- def trc(c):
- c = c.lower()
- base = ord('a')
- if c >= 'a' and c <='z':
- return trd[ord(c) - base + 1]
- else:
- return c
- return "".join([trc(c) for c in l])
- while True:
- print trl(raw_input())
Add Comment
Please, Sign In to add comment