Skip to main content

Mojo function

any

any[T: Boolable & Copyable & Movable, //](list: List[T, hint_trivial_type]) -> Bool

Checks if any element in the list is truthy.

Parameters:

Args:

  • list (List): The list to check.

Returns:

Bool: True if any element in the list is truthy, False otherwise.

any[T: Boolable & Copyable & Movable & Hashable & EqualityComparable, //](set: Set[T]) -> Bool

Checks if any element in the set is truthy.

Parameters:

Args:

  • set (Set): The set to check.

Returns:

Bool: True if any element in the set is truthy, False otherwise.

any(value: SIMD[dtype, size]) -> Bool

Checks if any element in the simd vector is truthy.

Args:

  • value (SIMD): The simd vector to check.

Returns:

Bool: True if any element in the simd vector is truthy, False otherwise.

Was this page helpful?