The following said and three mesh operation is a bit similar, but not the same, I do not know how to draw up the title, the first is the title, we all know that there is no three-mesh operation in Python, but and/or a bit similar to the three-mesh operation:
and/or
Use alone to denote a logical relationship with and OR and can also be set and used as follows
and
Before and after if a value is False (false, ', [], {}, None ...) Returns the first false value if all values are true return the last truth
Or
If or any one of the values is true, return this value immediately if all values are false, or returns the last False value
Example
result = ' Test ' and True # result = Trueresult = ' Test ' and ' ortest ' # result = Ortestresult = False and ' ortest ' # result = Falseresult = ' and none # ' result = ' result = ' or ' Hall ' # result = Hallresult = False or None # result = Noneresul t = ' test ' or ' nottest ' # result = Test
Use single-line if else to simulate trinocular operations
Result if true/false else fresult if is true when results are result, false when results are Fresult
result = ' Test ' if True Else ' not test ' # result = ' Test ' result = ' test ' if False Else ' not test ' # result = ' not test '