Example-
String is s="HEllo
#world!"
Aim-
-To get special character from the string , so this return ['
','#','!']
program-
#import the re module
import re
#take input of string
print("Enter string")
s=input()
#fill all special character from the string
x=re.findall('W',s)
print("Special Character that are present in string :",x)
Enter string
Hello
#world!-
Special Character that are present in string : ['
', '#', '!', '-']
Enter string
#$%^&*123
Special Character that are present in string : ['
', '#', '$', '%', '^', '&', '*']
Enter string
string123
Special Character that are present in string : []