For this Question: Given a string which contains all special characters along with letters of the english alphabet, both uppercase and lowercase, your task is to reverse the given string such that special characters will not get affectedInput contains a single line containing the string S.

Constraints:-
1 <= |S| <= 100000

Note:- String will contain alphabets (A. Z, a. z) and special characters (@, #, $ ....)
String may contains empty spacesPrint the reverse string without affecting special characters <b>or</b> reverse string in which only alphabets are reversedSample Input:-
Ab,c,de!$

Sample Output:-
ed,c,bA!$

Sample Input:-
a!!!b. c. d, e'f, ghi

Sampple Output:-
i!!!h. g. f, e'd, cba, I have written this Solution Code: def reverseString(S):
        string = list(S)
        
        start = 0
        end = len(S) - 1
        
        while start <= end:
            if string[start].isalpha() and string[end].isalpha():
                string[start], string[end] = string[end], string[start]
                start += 1
                end -= 1
            elif not string[start].isalpha() and string[end].isalpha():
                start += 1
            elif string[start].isalpha() and not string[end].isalpha():
                end -= 1
            else:
                start += 1
                end -= 1
        
        return ''.join(string)
        
      
string=input() 
string = reverseString(string) 
print (string), In this Programming Language: Python, Now tell me if this Code is compilable or not?