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 refer to our video player troubleshooting guide for assistance.

Why Having a Switch/Case in Python Would Be Useful

In this lesson, you’ll see why having switch/case in Python would be useful. Python does not have a switch/case statement and because of this, many Python developers useif statements to decide on what action to take based on a condition:

Python
if cond == 'cond_a':
    handle_a()
elif cond == 'cond_b':
    handle_b()
else:
    handle_default

This lesson will go over some of the problems of using this approach.

Become a Member to join the conversation.