In this example, we have the input as three bits representing A, B, C and we have denoted them as [0:2] X which means we have three bits with the index 0 representing the MSB. We could have specified it as [2:0] X in which case the index 2 represents the MSB.
assign [7:0] X = 8'b00101011;
where the 8'b specifies that we are defining an 8-bit binary number and 00101011 is that 8-bit binary number. You can also assign parts of the number as
assign [2:0] X = 3'b101;
which assigns only the last three bits of X.