Logo

Programming-Idioms

History of Idiom 12 > diff from v64 to v65

Edit summary for version 65 by schuelermine:
[Python] Fixed grammar (in explanation)

Version 64

2019-06-07, 10:26:40

Version 65

2019-06-07, 10:27:12

Idiom #12 Check if list contains a value

Check if list contains a value x.
list is an iterable finite container.

Illustration

Idiom #12 Check if list contains a value

Check if list contains a value x.
list is an iterable finite container.

Illustration
Extra Keywords
array vector
Extra Keywords
array vector
Code
x in list
Code
x in list
Comments bubble
This calls indirectly list._contains__() and returns True or False
Comments bubble
This indirectly calls list._contains__() and returns True or False