Shelf Engine processes text identifiers and needs to verify whether two strings contain exactly the same characters with the same frequencies. Given two strings, determine whether one is a permutation of the other.
The comparison is case-sensitive, and every character counts, including spaces and punctuation. The order of characters does not matter.
Implement a function that accepts two strings, first and second, and returns a boolean:
True if second is a permutation of first.False otherwise.You may use Python's standard library, but do not modify either input string.
def are_permutations(first, second):