Your question is Python Anagram and Kwargs. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Tech Mahindra data-processing utilities may receive text with inconsistent capitalization or spacing. Implement a function that determines whether two strings are anagrams while supporting optional behavior through Python kwargs.
Two strings are anagrams when they contain the same character frequencies after applying the requested normalization rules.
Implement are_anagrams(s, t, **kwargs):
s and t are non-null strings.case_sensitive is an optional keyword argument. It defaults to False. When False, compare characters without regard to case.ignore_spaces is an optional keyword argument. It defaults to True. When True, ignore all whitespace characters, including spaces, tabs, and newlines.True if the normalized strings are anagrams; otherwise return False.**kwargs means, how it is represented inside the function, and why keyword arguments are useful here.def are_anagrams(s, t, **kwargs):