Welcome to this file featuring three functions for different data structures:
This function checks if a given expression with parentheses, curly braces, and square brackets is balanced.
is_balanced(expression1): Checks if the expression is balanced.is_balanced(expression2): Verifies the balance of another expression.
The remove_duplicates function eliminates duplicates from a sequence (list or tuple) while maintaining the original order.
remove_duplicates(input_sequence): Removes duplicates from the given sequence.
The word_frequency function calculates the frequency of each word in a sentence, ignoring punctuation and considering words in a case-insensitive manner.
word_frequency(sentence): Calculates word frequency in the provided sentence.