Mojo slice __eq__ Function

Mojo slice __eq__ function “compares this slice to the other”.

Syntax

__eq__(self: Self, other: Self) -> Bool

Parameters

other (Self): the slice to compare to.

Return value

It returns True if this slice’s start, end, and step values match the corresponding values of the other slice and False otherwise.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.