For a given line, write a Python program to check if the given line starts with Vowel or not.
Input : animal Output: Accepted Input: zebra Output: Not Accepted
In this program we use the
search () module re .
re.search() : This method returns None (if the pattern does not match) or
re.MatchObject which contains information about the matching part of the string. This method stops after the first match, so it is better suited for validating regular expressions than retrieving data.
Let's take a look at a Python program to do this:
Valid Invalid Invalid
Vincent Bumgarner has been designing software for nearly 20 years, working in many languages on nearly as many platforms. He started using Splunk in 2007 and has enjoyed watching the product evolve ov...
The big data era is upon us: data are being generated, analyzed, and used at an unprecedented scale, and data-driven decision making is sweeping through all aspects of society. Since the value of data...
It’s in all of us. Data science is what makes us humans what we are today. No, not the computer-driven da...
Python Crash Course is the world's best-selling guide to the Python programming language. This quick and in-depth introduction to Python programming will get you started writing programs, solving prob...