Post History
Python 3.8 (pre-release), 98 bytes lambda s,n:''.join((c,chr((ord(c)+n-1-(o:=(64,96)[c.islower()]))%26+o+1))[c.isalpha()] for c in s) Try it online!
Answer
#1: Initial revision
# [Python 3.8 (pre-release)], 98 bytes <!-- language-all: lang-python --> lambda s,n:''.join((c,chr((ord(c)+n-1-(o:=(64,96)[c.islower()]))%26+o+1))[c.isalpha()] for c in s) [Try it online!][TIO-ktv2fmlf] [Python 3.8 (pre-release)]: https://docs.python.org/3.8/ [TIO-ktv2fmlf]: https://tio.run/##XY3NTsMwEITvPMVyQPYqbqS0JdBKvcMzAAfHiX@I8UYbl4S@fAjiQtEcRvrmk2b4yp7S7nHghSmfXpeoP5pWw6jSUYjynUKS0ijjWUriVhos0qbaSDqeZL1XhxpfTBnGSFPHEt8Q77Z1QUWFv1zHweuVgyUGAyHBiMvAIWW53knx1MVICibi2JZC7RFv/qyZKf5EqOr@enEzzT1cvHMZLg3NwD5BCkI9XHvPMOmUoeFO91aP@VYo2P57cedPC457B2tbb1el2iEu3w "Python 3.8 (pre-release) – Try It Online"