Skip to main content
added 162 characters in body
Source Link
orlp
  • 39.2k
  • 7
  • 81
  • 195

Python 3, 50 bytes

lambda s,k:s.translate(dict(zip(range(97,122),k)))

Or if we really have to implement an infinite loop:

Python 3, 70 bytes

t=dict(zip(range(97,122),input()))
while 1:print(input().translate(t))

Python 3, 50 bytes

lambda s,k:s.translate(dict(zip(range(97,122),k)))

Python 3, 50 bytes

lambda s,k:s.translate(dict(zip(range(97,122),k)))

Or if we really have to implement an infinite loop:

Python 3, 70 bytes

t=dict(zip(range(97,122),input()))
while 1:print(input().translate(t))
Source Link
orlp
  • 39.2k
  • 7
  • 81
  • 195

Python 3, 50 bytes

lambda s,k:s.translate(dict(zip(range(97,122),k)))