and
Builtin index · Collections & strings
result = a and b
Input: no input · Output: result
What it is
a and b are any values, read by whole-value truthiness.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = a and b | no input | result bool | Returns a bool. Both short-circuit: the right side is not evaluated when the left already decides the answer, so i < len(xs) and xs[i] > 0 is a safe guard. |
Examples
No documentation example calls this form yet. The Collections & strings chapter is where one belongs.
See also
or — documented in the same entry.