Practice assignment on strings
Practice assignment on strings
for i in string1:
if i in string2 and i not in matched :
sorted.append(i)
matched.append(i)
count=count+1
return count, sorted
a=common_chars_not_duplicate_case_sensitive_check("Ankita","Ajay")
print(a)"""
#2. ignoring case matching and counting duplicate occurrences of characters in string
1
#Write a program to read two strings and call the above functions by passing strings
as parameters.
#upload the code and the output
"""def common_chars_duplicate_also_ignore_case_sensitive(string1,string2):
sorted=[]
count=0
s1=string1.lower()
s2=string2.lower()
for i in s1:
if i in s2 :
sorted.append(i)
count=count+1
return count, sorted
a=common_chars_duplicate_also_ignore_case_sensitive("Ankita","Ajay")
print(a)"""