Mar-26-2019, 08:48 AM
(This post was last modified: Mar-26-2019, 08:48 AM by erfanakbari1.)
Hey there !
Since today , I've been trying to write a program doing this thing below :
So , I'll be very happy if you can possibly help me solving this problem .
Thanks .
Since today , I've been trying to write a program doing this thing below :
''' Create a program that takes some text and returns a list of all the characters in the text that are not vowels, sorted in alphabetical order and using some sets in it . '''I actually tried some way of doing this but unfortunately didn't work :
getString = input('Please enter something : ') # ConvertedString = set(getString) # print(type(ConvertedString)) print(getString) vowels = 'A', 'E', 'I', 'O', 'U' notVowels = [] for i in getString: for x in vowels: if i == x: print('Sorry') for y in getString: for c in vowels: if y not in c: notVowels.append(y) print(notVowels)and also
def recognize_vowels(vowels, consonants): for i in getString: if vowels not in i: consonants = list(getString) print(vowels) return vowels return consonants recognize_vowels({'A', 'E', 'I', 'O', 'U'}, getString)After all , yet I'm unable to get the output that I want

So , I'll be very happy if you can possibly help me solving this problem .
Thanks .