Implement a function called count_sign_changes that counts the number of times the sign of elements in a list changes as you iterate through the list. A sign change occurs when an element transitions from positive to negative or from negative to positive between consecutive elements.
Input/Output Requirements
Input: The function will take a single argument:
lst: A list of integers which may include positive numbers, negative numbers, and zeros.
Output: The function should return an integer representing the count of sign changes between consecutive elements in the list.
Implementation Details
A sign change is defined as:
Transitioning from a negative number to a non-negative number (0 or positive).
Transitioning from a non-negative number to a negative number.
The counting should start from the second element in the list, comparing each element with its predecessor.
File Structure
Write your implementation in the file located at /app/solution.py. The function should adhere to the provided signature:
python
def count_sign_changes(lst):
# Your implementation here
Example
python
# Example input
input_list = [-1, 2, -3, 4]
# Expected output
output = count_sign_changes(input_list) # Should return 3
Ensure your implementation works for edge cases such as empty lists and lists containing only one element.