xxxxxxxxxx
def remove_vowels(string):
vowels = "aeiouAEIOU"
return ''.join([char for char in string if char not in vowels])
# Example usage
input_string = "Hello, world!"
output_string = remove_vowels(input_string)
print(output_string)
xxxxxxxxxx
function shortcut (string) {
return string
.split('')
.filter(str => !'aeiou'.includes(str))
.join('')
}
//////////////////////////// OR /////////////////////
function shortcut (string) {
return string.replace(/[aeiou]/gi, '')
}