Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.
Python Boolean Operators
00:00 Now let’s take a look at how Python implements the Boolean operators.
00:05
If you’re coming from another language like JavaScript, Java, C#—any of the descendants of C—you’re probably familiar with using these symbols: the two ampersands (&&
) for AND, the two vertical bars (||
) for OR, and the exclamation point (!
) for NOT.
00:21
Python actually uses the keywords written in English: and
, or
, and not
. You would simply use those to separate your two expressions for and
and or
, or put not
in front of another expression to do its negation.
00:37
In the next set of lessons, we’ll take a look at some examples on how you would write expressions using the operator or
.
Become a Member to join the conversation.