For example, I have a text like this:
This is my String
I would like to grab TS, I would like to grab the upper case only.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
str.isupperpredicate method in conjunction withfilterin order to filter out the uppercase characters.If you want the result to be a string, not a sequence, join it with
''.join.