pyassistant

Shift Letters to Next Alphabet Character

Given a list of strings, transform each string by replacing every alphabetic character with the next character in the English alphabet. The replacement should preserve case: 'a' -> 'b', 'z' -> 'a', 'A' -> 'B', 'Z' -> 'A'. Non-alphabetic characters (digits, punctuation, spaces) should remain unchanged. Return the list of transformed strings in the same order.

Example:

Input:
(['Hello, World!', 'xyz', 'Zebra-123'],)
Output:
['Ifmmp, Xpsme!', 'yza', 'Afcsb-123']

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.