I'm currently new to python and got stuck at this question, can't seem to find the proper answer.
I have a list contain :
BLUE
BLUE-ELMWOOD-CAMO
BLUE-MIST
BLUE-MIST-SPRING-LEAF
BLUE-MULTI
BOTTLE-GREEN
CABANA-BLUE
CAPRI-NAVY
And I want to sort like this :
BLUE-ELMWOOD-CAMO
BLUE-MIST-SPRING-LEAF
BLUE-MIST
BLUE-MULTI
BLUE
BOTTLE-GREEN
CABANA-BLUE
CAPRI-NAVY
Like this:
I've tried list.sort()
but it gives the first one