Given this dictionary
test = {"a": 0.8, "b": 0.9, "c": 1.0, "d": 1.1, "e": 1.2 }
I want to create two lists: list_a with dictionary values <1 and list_b with dictionary values >=1
list_a = [0.8 , 0.9]
list_b = [1.0 , 1.1 , 1.2]
I'm using this code to convert the dictionary values to list
list_a = list(test.values())
but I don't know where to insert the IF statement. Is there a way to input the IF statement within the list function?
list_a = list(test.values() if test.values()>=1) #this is wrong