Mojo slice __eq__ Function

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


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


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.