The unofficial CircuitPython Reference

membership operators (in)

description

Python membership operators look for values in objects (lists, tuples, classes) and returns a True/False value depending on the presence of the value in the object.

syntax

""
OperatorDescriptionSyntax
inlooks for value in given object, returns True if the value is presenta in myList
not inlooks for value in given object, returns True if the value is NOT presenta not in myList

methods

parameters

returns

example code

serial output:

see also: