Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
firstStr = 'aeiou'
secondStr = '01223'
translation = string.maketrans(firstStr, secondStr)
string = "apple"
new_string=string[::-1]
print('translated string: ', new_string.translate(translation)+'aca')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment