# how to replace part of tuple

I would like to replace all elements $1/2$ in tuples with $0$, How should i do that I tried already this one : sel1 = ReplacePart[sel[[#]], 1/2 -> 0]

The tuples are:

tuples = Tuples[{1, -1/2, 1/2}, {Lan, Lan}]; sel = Select[tuples, Total[#, 2] == 14 &]

• Note that your question has little or nothing to do with tuples... but instead with any list. – David G. Stork Sep 19 '18 at 18:50

To replace all instances of 1/2 in sel, you can use ReplaceAll (/.) as
sel /. (1/2 -> 0)