Letter Sequence Checker

A Python function that checks the order of two characters in a string.

The `order_check` function receives a string `s` and two lowercase letters `first` and `second`. It verifies whether all occurrences of `first` appear before any occurrence of `second` within `s`. If so, it returns `True`; otherwise, it returns `False`. ### Parameters - `s` (str): The input string. It is assumed to be non-empty, containing only alphabets and spaces. - `first` (str): A lowercase character. The function checks to see if its every occurrence in `s` comes before any occurrence of `second`. - `second` (str): A lowercase character. This should only appear after all occurrences of `first`. ### Return Value - Returns `True` if all occurrences of `first` are situated before any occurrence of `second` within the string `s`. - Returns `False` otherwise. ### Examples ```python # 'a' always appears before 'j' in the sentence order_check("a rabbit jumps joyfully", "a", "j") # Returns: True # 'k' always appears before 'w' in the sentence order_check("knaves knew about waterfalls", "k", "w") # Returns: True # 'a' appears after 'y' once in the sentence order_check("happy birthday", "a", "y") # Returns: False # 'k' appears after 'a' in the sentence order_check("precarious kangaroos", "k", "a") # Returns: False ```