25 lines
571 B
Python
25 lines
571 B
Python
#!/usr/bin/python3
|
|
|
|
# re.sub(r' ', 'with what', 'string to replace in')
|
|
# 0123456789 - abcdefghij
|
|
|
|
import sys
|
|
import re
|
|
|
|
def changer(p):
|
|
p = re.sub(r'0', 'a' , p.group(0))
|
|
p = re.sub(r'1', 'b' , p)
|
|
p = re.sub(r'2', 'c' , p)
|
|
p = re.sub(r'3', 'd' , p)
|
|
p = re.sub(r'4', 'e' , p)
|
|
p = re.sub(r'5', 'f' , p)
|
|
p = re.sub(r'6', 'g' , p)
|
|
p = re.sub(r'7', 'h' , p)
|
|
p = re.sub(r'8', 'i' , p)
|
|
p = re.sub(r'9', 'j' , p)
|
|
return str(p)
|
|
|
|
for line in sys.stdin.readlines():
|
|
temp = re.sub(r'\d{4}', changer, line)
|
|
print(temp.strip('\n'))
|