ATM Pin Verification

Define a Python function that confirms if an ATM Pin is valid or not.

Develop a function `is_valid_pin(pin)` in Python that verifies the validity of an ATM Pin, an essential security feature in banking. A **valid** pin should only have 4 or 6 digits, strictly. If the provided pin meets these conditions, the function should return `True`, and `False` otherwise. ### Parameters - `pin` (str): The ATM pin code to be validated. ### Return Value - The function returns `True` if the `pin` is precisely 4 or 6 digits long; it returns `False` if these conditions aren't met. ### Examples ```python # Pin '1234' is valid is_valid_pin("1234") # Returns: True # '12345' is not valid as it has 5 digits is_valid_pin("12345") # Returns: False # 'a234' is not valid because it contains a non-digit character is_valid_pin("a234") # Returns: False # An empty string isn't a valid pin is_valid_pin("") # Returns: False ```