Q2)WAP to find vowels in a string(s1) and concatenate those vowels with string(S2) in uppercase only. Take the
input for S1 and S2 from user with the help of function only.
Answers
Answered by
1
def vowel_hunter(str_1, str_2):
vowels = ["a", "e", "i", "o", "u"]
vowels_upper = [v.upper() for v in vowels]
found = [c for c in str_1 if c in [*vowels, *vowels_upper]]
found_upper = [v.upper() for v in found]
return str_2 + "".join(found_upper)
print(vowel_hunter((s1 := input("str_1: ")), (str_2 := input("str_2: "))))
Similar questions