Seturi
🍣🍣🍣 (set of sushi)
#1
def vowel_count(str):
count = 0
vowel = set("aeiouAEIOU")
for alphabet in str:
if alphabet in vowel:
count = count + 1
print("No. of vowels :", count)
str = "GirlsGOIT"
vowel_count(str)
#2
set1 = {1, 2, 3, 4, 5}
print ("initial string", set1 )
print (type(set1 ))
res = dict.fromkeys(set1 , 0)
print ("final list", res)
print (type(res))Last updated