# Logical Python SequenceIterator Methods

> The following logical operators methods (except `not()`) take an input sequence argument, and produce the boolean result sequence by applying the specified logical operator on the object's sequence and the corresponding elements in the input sequence.

> If the two input sequence arguments are of different lengths the operation will be performed on only the number of elements in the shorter of the two sequences.

> The operator can be one of the following:

> not() | The element of the result sequence is the logical not of the corresponding element in object
> and( input ) | The element of the result sequence is the logical and of the corresponding elements in the object and input sequences
> or( input ) | The element of the result sequence is the logical or of the corresponding elements in the object and input sequences
> xor( input ) | The element of the result sequence is the logical exclusive or of the corresponding elements in the object and input sequences

> ## Example

> Following is an example code snippet demonstrating a logical operator method:

>         cursor = con.cursor("Quote", "by_sym")
>         for quote in cursor:
>             ...
>             highIterator = quote.close.eq(quote.high)
>             constIterator = exdb.SequenceIterator.const(100.0, exdb.Database.MCO_DB_FT_SEQUENCE_FLOAT)
>             lowIterator = quote.close.gt(constIterator)
>             orIterator = highIterator.or(lowIterator)

>             ...