Write a Python Program to find sequences of one upper case letter followed by lower case letters. If found, print ‘Yes’, otherwise ‘No’.
Input : Geeks Output : Yes Input : geeksforgeeks Output : No
Approach: Using re.search()
To check if the sequence of one upper case letter followed by lower case letters we use regular expression ‘
Yes Yes No
- Python program to count upper and lower case characters without using inbuilt functions
- Python program to convert camel case string to snake case
- Python String Methods | Set 1 (find, rfind, startwith, endwith, islower, isupper, lower, upper, swapcase & title)
- Regex in Python to put spaces between words starting with capital letters
- isupper(), islower(), lower(), upper() in Python and their applications
- Python | Pandas Series.str.lower(), upper() and title()
- Python | Case Counter in String
- Switch Case in Python (Replacement)
- Python | Toggle characters in words having same case
- Python | Convert case of elements in a list of strings
- Python 3 | Program to print double sided stair-case pattern
- Python | Ways to sort list of strings in case-insensitive manner
- Find all the patterns of “1(0+)1” in a given string using Python Regex
- Python | Find longest consecutive letter and digit substring
- Python | Find the list elements starting with specific letter
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.