How to replace an item using if-then-else in a list?

unhandled

(Fangweimo) #1

Hi everyone,
If we have a list
(1,2,3,4,5,11)
and wish to change the number “11”
by using (if the number is greater than 10, then replace the number by 10, if not it will equal to itself)

(1,2,3,4,5,11)→(1,2,3,4,5,10)


#2


(Fangweimo) #3

Thank-you Kim, is really helpful