Question d’entretien chez Infosys

Python Program: Remove vowels from given string, and count no of vowels in given string

Réponse à la question d'entretien

Utilisateur anonyme

9 janv. 2026

input_data = "Donald Trump" vowels = ['a','e','i','o','u','A','E','I','O','U'] output_data = [ch for ch in input_data if ch not in vowels] print("Expected output:", "".join(output_data)) print("No of vowels :", len(input_data)-len(output_data))