get all alphabet from string by findall() in python by R4R Team


program-

#import the re module
import re

#take input of string
print("Enter string")
s=input()

#fill all alphabet character from the string
x=re.findall('D',s)
print("Character that are present in string :",x)


output-

Enter string
string1234
Character that are present in string : ['s', 't', 'r', 'i', 'n', 'g']

Enter string
1234567
Character that are present in string : []


-In this program, we take a input of string and find all string character by using re.findall() function where 'D' is the special sequence which neglect the numeric string.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!