Skip to main content
1 of 2
Adnan
  • 44.5k
  • 6
  • 83
  • 246

#05AB1E, 5 bytes

Code:

[A¹‡,

Explanation:

[      # Start an infinite loop.
 A     # Push the lowercase alphabet.
  ¹    # Push the first input (substitution map).
   ‡   # Transliterate. Since the arity of this function is 3 and there are only 2 values
                        on the stack, it implicitly takes a line of input.
    ,  # Pop and print.

So this continually reads a line of input and prints a line of input after. Uses CP-1252 encoding. This is what I got with the console version:

D:\Golfing\05AB1E>C:\Python34\python.exe 05AB1E.py test.abe
qwertyuiopasdfghjklzxcvbnm
hello
itssg
welcome
vtsegdt
greetings, planet!
ukttzoful, hsqftz!

Trying this online might be a bit weird, since 05AB1E is trying to read another line of input, but there is none, so you need to kill it to receive output (doesn't work all the time). It might be a better idea to do this with the console version of 05AB1E. Try it online!.

Adnan
  • 44.5k
  • 6
  • 83
  • 246