Skip to content

Instantly share code, notes, and snippets.

@CodeGolfScotland
Last active October 5, 2016 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeGolfScotland/7e35bb9b0315dab358892415e0d329c8 to your computer and use it in GitHub Desktop.
Save CodeGolfScotland/7e35bb9b0315dab358892415e0d329c8 to your computer and use it in GitHub Desktop.
Code Golf September 2016

September 2016 - Reversed Alphabet

Task

Reverse the alphabet so that abc => zyx and ABC => ZYX

Examples:

("code") => "xlwv" ("Golf") => "Tlou" ("1Avva8TT") => "1Zee8GG"

^You can assume that you will always recieved a valid string

About Code Golf Scotland

@achanda
Copy link

achanda commented Sep 26, 2016

Language: Python 2.7
Length: 51
Solution:

f=lambda s:`map(lambda x:chr(31^4+ord(x)),s)`[2::5]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment