Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences 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.

Using the Python and Operator (Summary)

Python’s and operator allows you to construct compound Boolean expressions that you can use to decide the course of action of your programs. You can use the and operator to solve several problems both in Boolean or non-Boolean contexts. Learning about how to use the and operator properly can help you write more Pythonic code.

In this video course, you learned how to:

  • Work with Python’s and operator
  • Build Boolean and non-Boolean expressions with Python’s and operator
  • Decide the course of action of your programs using the and operator in Boolean contexts
  • Make your code more concise using the and operator in non-Boolean contexts

For more information on Python’s Boolean operators, you can check out:

Download

Sample Code (.zip)

3.8 MB

Download

Course Slides (.pdf)

1.2 MB

Become a Member to join the conversation.