Question: How to check if multiple variables are different?

I am looking for a way to check if multiple variables are different. Let's say I have 4 variables named a, b, c and d. You can do it with "a!=b and a!=c and a!=d and b!=c and b!=d and c!=d", but it quickly becomes impractical when you have more variables.

 

Can anyone shed some light on this?

Thanks!

Please Wait...