Given a string, the task is to check and accept the given string if contains all vowels i.e. ‘a’, ‘e’, ‘i’.’o’, ‘u’ or ‘A’, ‘E’, ‘I’, ‘O’, ‘U’ .
Input : geeksforgeeks Output : Not Accepted Input : ABeeIghiObhkUul Output : Accepted
Approach : Firstly, create set of vowels using
set() function. Check for each character of the string is vowel or not, if vowel then add into the set s. After coming out of the loop, check length of the set s, if length of set s is equal to the length of the vowels set then string is accepted otherwise not.
Below is the implementation :
- Python Regex - Program to accept string starting with vowel
- Python Regex | Program to accept string ending with alphanumeric character
- Python program to count number of vowels using sets in given string
- Python program to find uncommon words from two Strings
- Python Program to Count number of binary strings without consecutive 1's
- Python | Alternate vowels and consonents in String
- Python | Count and display vowels in a string
- Python | Remove empty strings from list of strings
- Python | Tokenizing strings in list of strings
- Python | Interleaving two strings
- C strings conversion to Python
- Python | Split Sublist Strings
- Python | How to sort a list of strings
- Python 3 Strings | expandtabs() method
- Python | Extract K sized strings
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.