def is_specialsub(S, A):
newS = ""
newA = ""
for x in S:
if x.isalpha():
newS += x
for i in A:
if i.isalpha():
newA += i
return True if newA in newS else False
print(is_specialsub("hello", "hello"))
The last line tests the function and you can change it to test the function in different ways. Best of luck.