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

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds 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 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.

Exploring Keywords in Python (Summary)

Python keywords are the fundamental building blocks of any Python program. Understanding their proper use is key to improving your skills and knowledge of Python.

Throughout this video course, you’ve seen a few things to solidify your understanding Python keywords and to help you write more efficient and readable code.

In this video course, you’ve learned about:

  • The Python keywords and their basic usage
  • Several resources to help deepen your understanding of many of the keywords
  • Python’s keyword module for working with keywords in a programmatic way

To take a closer look at keywords, you can check out:

If you’d like to refresh your knowledge, then you can visit:

If you’d like to explore soft keywords further, then you can read Python 3.10: Cool New Features for You to Try.

And if you’d like to use keywords in context, you can do so by visiting:

Download

Sample Code (.zip)

10.1 KB

Download

Course Slides (.pdf)

2.2 MB

00:00 Congratulations! You made it to the last lesson of this course. I will quickly summarize what you learned and then will give you inspiration about what to do next.

00:12 You started by listing all Python keywords, with the built-in functions keyword() and help(). And then you learned that keywords are special, reserved words.

00:22 They are restrictive in their usage, and they are fundamental building blocks and always available. That means you don’t need to import them into your Python code.

00:34 In lesson three, we categorized the keywords, and you also got a cheat sheet. And this was a quite long lesson, but with the grouping of the keywords and the examples that I provided you, you hopefully got an idea about how you can use them and maybe how you already use those Python keywords.

00:55 So it’s all fine to know keywords theoretically, but sometimes there are situations where you want to identify them in your code. And that’s what you learned in lesson four. Again, you use the built-in keyword() function or the help() function and also leveraged syntax highlighting in your code editor.

01:16 Another way of identifying keywords was just running into syntax errors, and then you know. And last but not least, you learned about deprecated keywords.

01:27 The main takeaway here was that the exec and print statements are now functions. So if you’re wondering what to do next, of course, we at Real Python have you covered. The links that you will see in the next slides are also in the description below, so you can just click them and read on.

01:47 So, one thing that you can do is have a closer look at keywords. Here are five example articles for lambda, yield, is, pass, and import.

01:59 Especially soft keywords are worth to be investigated further. They were introduced in Python 3.10, as you learned in this course, and we have an article about all the cool new features of Python 3.10, including examples for the structural pattern matching with match and case.

02:19 Some of the examples you found in this course were a bit isolated just to get the point across about what the keyword is. So it might make sense to use the keywords in their context, and of course we have tutorials for that. For example, how to define your own functions, how to work with files, or the general introduction to object-oriented programming. Well, actually you can jump into any tutorial or course on this website because you won’t find any tutorial or course that doesn’t contain any Python keywords. So again, thank you so much for participating in this course.

03:01 Congratulations on completing it, and see you next time.

Become a Member to join the conversation.