Having following list
base_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
If I want to separate it into 2 lists by criteria x > 5
in one line I will do sonething like this
list_1 = [num for num in base_list if num < 5]
list2 = [num for num in base_list if num > 5]
I'm wondering if it possible to make it one line?
Something like this
list1, list2 = [num for num in base_list if num < 5 and_here_else_part_for_second_list]