Answer the question
In order to leave comments, you need to log in
How to beautifully synchronize three variables?
There are three variables. Two of them have the same meaning, one has some other meaning. How to set all variables to the value that occurs most often so that it is beautiful?
a = b = 1
c = 2
Answer the question
In order to leave comments, you need to log in
The task is, of course, ultra-strange, but like this:
It works if and only if at least two of the three variables really have the same value
a = b = c = a if a==b else c
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question