It's a well-known fact that $H^*(\bigsqcup_{\alpha}X_{\alpha};R)\xrightarrow{\cong}\prod_{\alpha}H^*(X_{\alpha};R)$ that is also in Hatcher Chapter 3, example 3.13. My attempt by definition is that
$H^*(\bigsqcup_{\alpha}X_{\alpha};R) = \bigoplus_{k\geq 0}H^k(\bigsqcup_{\alpha}X_{\alpha};R)=\bigoplus_{k\geq 0}\prod_{\alpha}H^k(X_{\alpha};R)$
and
$\prod_{\alpha}H^*(X_{\alpha};R)=\prod_{\alpha}\bigoplus_{k\geq 0}H^k(X_{\alpha};R).$
However, is it true that $\bigoplus_{k\geq 0}\prod_{\alpha}H^k(X_{\alpha};R)=\prod_{\alpha}\bigoplus_{k\geq 0}H^k(X_{\alpha};R)$? I remembered from my algebra course that direct sum and direct product can not be interchanged, but I have trouble constructing a good example. Would anyone like to point out my mistake here or a good example for failing to interchange $\prod$ and $\bigoplus$? If it fails, how could we prove this fact?
Appreciate your help!