Help! Python Keywords
Instructions
Q&A (0)
Notes (0)
Resources (0)
Saving Progress...
Resources
There are no resources for this lesson.
Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.
Python keywords are reserved words you cannot use when you are creating functions or variables. Keywords can potentially change with each version of Python, but you check your existing keywords using the help command:
help("keywords")
Try it in the interactive Python console below:
Here is a list of the Python keywords as of Python 3.10:
False | class | from | or |
None | continue | global | pass |
True | def | if | raise |
and | del | import | return |
as | elif | in | try |
assert | else | is | while |
async | except | lambda | with |
await | finally | nonlocal | yield |
break | for | not |
You can learn more about each keyword by using the help command like so:
help("async")
You can press enter to continue to the next line, and press Q to return to your interactive console.
It's important to not use these keywords when you're writing Python code. For example, you don't want to create a variable or function called "continue" because this is a Python keyword.