Skip to content

Instantly share code, notes, and snippets.

@AnnikaNoren
Created November 12, 2020 18:05
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 AnnikaNoren/6b080d8ac26cb5254d2c09d9f0027b8a to your computer and use it in GitHub Desktop.
Save AnnikaNoren/6b080d8ac26cb5254d2c09d9f0027b8a to your computer and use it in GitHub Desktop.
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