#K60592. Permutation Checker
Permutation Checker
Permutation Checker
Given two strings, determine if one string is a permutation of the other. A permutation means that both strings have the same frequency of each alphabetic character, ignoring case and any non-alphabetic characters. In mathematical terms, if we denote by \( f(s) \) the function that extracts and normalizes all alphabetic characters from string \( s \), then the two strings are permutations if \( \text{Counter}(f(s_1)) = \text{Counter}(f(s_2)) \).
The input is read from stdin and the output should be printed to stdout. You must output True
if the two strings are permutations of each other, and False
otherwise.
inputFormat
The input consists of two lines. The first line contains the first string and the second line contains the second string.
outputFormat
Output a single line containing either True
or False
based on whether the two strings are permutations of each other.
listen
silent
True