string1=input('enter first string:') string2=input('enter second string:') string1=string1.lower() string2=string2.lower() if sorted(string1)==sorted(string2): print('string1 and string2 are anagrams') else: print('string1 and string2 are not anagrams')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter