Real Python

Source Code: Click here to download a user-permissions checker that uses in and not in to test membership.

Almost there! Complete this form and click the button below to gain instant access:

Python's "in" and "not in" Operators: Check for Membership

Check User Permissions With Python's in Operator

๐Ÿ”’ No spam. We take your privacy seriously.

ยฉ 2012โ€“2026 Real Python โ‹… Privacy Policy