Error expected end of statement

I am using the godot version 4.2

My line of code

Var toList : Array = is_black_move truthy_value if true_condition else: falsy_value : whitePieces : blackPieces

I get the error message expected end of statement after variable declaration, found “identifier” instead

You are using too many colons

Var toList : Array = [is_black_move, truthy_value] if true_condition else [falsy_value, whitePieces, blackPieces]

Is this what you mean?