Let $(X, \tau)$ be a topological space and $I$ be an infinite set. I want to define a topology on $X^I$ by open sets in $X$. Is it true that a non-empty set $\mathcal{U}\subseteq X^I$ is open in $X^I$ if there is finite set $A$ such that $\mathcal{U}=\prod_{\alpha\in A} U_\alpha$, where $U_\alpha=X$ if $\alpha\notin A$ and for $\alpha\in A$, $U_\alpha\in \tau$.`
Please help me to know is it true?
There are all kinds of topologies on $X^{I}$. The collection of sets you have defined is not a topology. You have to all possible unions of those sets to get a topology. The resulting topology is called the product topology on $X^{I}$. [For another topology you can look at Wikipedia for the 'box topology']