String | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

String

Iā€™m trying to create a project, where the user is prompted for an input(input is a phrase, like ā€œEverything%%^^ smells%#* good**^%#ā€). I want the output to be ā€œerythingev ellssm odogā€. The project will remove the first two elements from each word and insert it at the back of the word and remove the special characters.

16th May 2020, 7:47 PM
Jibril Balogun
Jibril Balogun - avatar
1 Resposta
+ 2
I see you've completed the python coarse...with that in mind.......try using regular expressions module (re). You can pull all the words and use string slicing.
16th May 2020, 8:14 PM
rodwynnejones
rodwynnejones - avatar