Create a function that takes a string as a parameter and does the following, in this order:

1. replaces every letter with the letter following it in the alphabet (see note below)
2. makes any vowels capital
3. makes any consonants lower case

**Note:** the alphabet should wrap around, so `Z` becomes `A`

So, for example the string `"Cat30"` would return `"dbU30"` (`Cat30 --> Dbu30 --> dbU30`)

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def changer(string):
	

Solutions:
def changer(s):
	return s.lower().translate(str.maketrans('abcdefghijklmnopqrstuvwxyz', 'bcdEfghIjklmnOpqrstUvwxyzA'))


changer = lambda s: ''.join([a if not a.isalpha() else chr((ord(a) - 96) % 26 + 97).upper() if a in 'zdhnt' else chr(ord(a) + 1) for a in s.lower()])


table = str.maketrans('abcdefghijklmnopqrstuvwxyz', 'bcdEfghIjklmnOpqrstUvwxyzA')

def changer(stg):
	return stg.lower().translate(table)


from string import ascii_lowercase
trans = str.maketrans(ascii_lowercase, 'bcdEfghIjklmnOpqrstUvwxyzA')

def changer(string):
	return string.lower().translate(trans)


def changer(string):
	return string.lower().translate(str.maketrans('abcdeffghijklmnopqrstuvwxyz', 'bcdEffghIjklmnOpqrstUvwxyzA'))


from string import ascii_lowercase as al
xs = ''.join((c.upper() if c in 'aeiou' else c for c in al)) * 2
tbl = str.maketrans(al + al.upper(), xs[1:] + xs[0])

def changer(s):
	return s.translate(tbl)


def changer(string):
	d = str.maketrans('abcdefghijklmnopqrstuvwxyz', 'bcdEfghIjklmnOpqrstUvwxyzA')
	return string.lower().translate(d)


import re

def changer(st):
	st = st.lower().translate(st.maketrans('abcdefghijklmnopqrstuvwxyz', 'bcdefghijklmnopqrstuvwxyza'))
	return re.sub('[aeiou]', lambda m: m.group().upper(), st)


def changer(string):
	string = ''.join((chr(ord(letter) + 1).upper() if chr(ord(letter) + 1) in 'aeiouAEIOU' else letter if letter in ' 0123456789' else 'A' if letter.lower() == 'z' else chr(ord(letter) + 1).lower() for letter in string))
	return string


from string import ascii_letters
tr = str.maketrans(ascii_letters, 'bcdEfghIjklmnOpqrstUvwxyzA' * 2)

def changer(s):
	return s.translate(tr)