#6 Exercise - Python Program that Removes All Vowels From a Given String | Python for Beginners

preview_player
Показать описание
In this video, we'll learn how to write a Python program that takes a string as input and returns a new string with all of the vowels removed. We'll use the for loop to iterate through the characters of the input string and build up the modified string character by character.

𝐄𝐱𝐞𝐫𝐜𝐢𝐬𝐞 6 - 𝐖𝐫𝐢𝐭𝐞 𝐚 𝐏𝐲𝐭𝐡𝐨𝐧 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 𝐭𝐡𝐚𝐭 𝐭𝐚𝐤𝐞𝐬 𝐚 𝐬𝐭𝐫𝐢𝐧𝐠 𝐚𝐧𝐝 𝐫𝐞𝐭𝐮𝐫𝐧𝐬 𝐚 𝐧𝐞𝐰 𝐬𝐭𝐫𝐢𝐧𝐠 𝐰𝐢𝐭𝐡 𝐚𝐥𝐥 𝐨𝐟 𝐭𝐡𝐞 𝐯𝐨𝐰𝐞𝐥𝐬 𝐫𝐞𝐦𝐨𝐯𝐞𝐝.

This is a fun and educational exercise that will help you improve your Python skills.

So if you're ready to get started, hit the play button and let's dive in!
Рекомендации по теме
Комментарии
Автор

Another way of doing it. In the end you will get a new string, the output will remain same.

string = input("enter your string ")

vow = "aeiouAEIOU"

for i in string:
if i in vow:
string = string.replace(i, '')
print(string)

sharatbhaskar
join shbcf.ru