SWAP CASE:
Explantion:
In the first example S=abc and T=acb.Arjun can swap the 2nd and 3rd characters of S to make S and T equal.Hence ,the output is Yes
i/p:
abc
acb
o/p:Yes
def swap_case(S, T):
s1 = set(S)
s2 = set(T)
return s1 == s2
def main():
S = input()
T = input()
if swap_case(S, T):
print('Yes')
else:
print('No')
if __name__ == '__main__':
main()
Comments
Leave a comment