Solution for reversing a list
Solution for remove_by_value