Answer to Question #311065 in Python for Manish

Question #311065

Write a program to print the following,


Input

The first line of input contains a string S.

The second line of input contains a string T.


Sample Input1

abc

acb

Sample Output1

Yes


Sample Input2

aabb

bbaa

Sample Output2

No



1
Expert's answer
2022-03-16T18:31:54-0400
def check_string(str1, str2):
    if sorted(str1) == sorted(str2):
        return 'Yes'
    else:
        return 'No'
check_string('acb', 'abc')

'Yes'

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