Answer to Question #320773 in Python for sandhya

Question #320773

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



1
Expert's answer
2022-04-01T05:26:03-0400
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()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS