4. Six different cards are marked with the numbers 2, 2, 4, 4, 6, 6, respectively. Three cards are drawn from them. The probability that the numbers on these three cards can serve as the lengths of the sides of a triangle is ( ).
(A) $\frac{1}{2}$
(B) $\frac{2}{5}$
(C) $\frac{2}{3}$
(D) $\frac{3}{4}$
4. B.

If the numbers on the three cards drawn are all different, there are $2 \times 2 \times 2=8$ ways to draw them; if the numbers on the three cards drawn are the same, there are $3 \times 4=12$ ways to draw them. Therefore, from six different cards, there are $8+12=20$ ways to draw three cards.

To form the sides of a triangle with the three numbers, the only possibilities are:
$$
(2,4,4),(4,4,6),(2,6,6),(4,6,6) \text {. }
$$

Since the numbers on different cards can be repeated, the number of ways to draw three cards such that the numbers can form the sides of a triangle is $4 \times 2=8$.
Therefore, the required probability is $\frac{8}{20}=\frac{2}{5}$.