# pre_4 Given a non-empty list of ints, return a new list containing the elements from the original list that come before the first 4 in the original list. The original list will contain at least one 4. Note that it is valid in java to create a list of length 0. This exercise was taken from [codingbat.com](https://codingbat.com/prob/p100246) and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java. ### Test 1 **Input:** ``` [1, 2, 4, 1] ``` **Output:** ``` [1, 2] ``` ### Test 2 **Input:** ``` [3, 1, 4] ``` **Output:** ``` [3, 1] ``` ### Test 3 **Input:** ``` [1, 4, 4] ``` **Output:** ``` [1] ``` ### Test 4 **Input:** ``` [1, 4, 4, 2] ``` **Output:** ``` [1] ``` ### Test 5 **Input:** ``` [1, 3, 4, 2, 4] ``` **Output:** ``` [1, 3] ``` ### Test 6 **Input:** ``` [4, 4] ``` **Output:** ``` [] ``` ### Test 7 **Input:** ``` [3, 3, 4] ``` **Output:** ``` [3, 3] ``` ### Test 8 **Input:** ``` [1, 2, 1, 4] ``` **Output:** ``` [1, 2, 1] ``` ### Test 9 **Input:** ``` [2, 1, 4, 2] ``` **Output:** ``` [2, 1] ``` ### Test 10 **Input:** ``` [2, 1, 2, 1, 4, 2] ``` **Output:** ``` [2, 1, 2, 1] ```