Reverse String Without Affecting Special Characters

Published by Manoj Dhakshan in

Reverse the string without affecting special characters and numbers.

Examples

rev_specstring("AFC#47GH$Ieu") ➞ "ueI#47HG$CFA"

rev_specstring("guyhiuj1234!@#$%rtyhghu") ➞ "uhghytr1234!@#$%juihyug"

rev_specstring("12!@" ) ➞ "12!@"

Notes

Try with for loops.

Watch a quick demo on how Edabit works.