2021年1月6日星期三

Checking the inequality of several variables in python without knowing their value

I have four string variables: a,b,c,d. I can't know their values (they are assigned randomly), and I don't care. I only need to make sure that every single on of them is different from others and there are not two variables with the same value. I tried

if a != b != c != d:      return true  

but it doesn't work. What should I do?

https://stackoverflow.com/questions/65606084/checking-the-inequality-of-several-variables-in-python-without-knowing-their-val January 07, 2021 at 11:02AM

没有评论:

发表评论