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 | Count and display vowels in a string
- Python | Remove empty strings from list of strings
- Python | Tokenizing strings in list of strings
- C strings conversion to Python
- Python | Interleaving two strings
- Python | Removing strings from tuple
- Python | C Strings of Doubtful Encoding | Set-2
- Python 3 Strings | expandtabs() method
- Interesting facts about strings in Python | Set 1
- Python | C Strings of Doubtful Encoding | Set-1
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.