Answer to Question #294448 in Python for Kutcharlapati Sruthi

Question #294448

a.     Write a python script to take two string S1 and S2 and do the following:

i)               Check S1 and S2 are anagrams or not.

ii)              Check S1 is Sub string of S2 or not.

iii)            S1 is palindrome or not


1
Expert's answer
2022-02-07T00:55:31-0500
s1=raw_input("Enter first string:")
s2=raw_input("Enter second string:")
if(sorted(s1)==sorted(s2)):
      print("The strings are anagrams.")
else:
      print("The strings aren't anagrams.")

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