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:

Falseclassfromor
Nonecontinueglobalpass
Truedefifraise
anddelimportreturn
aselifintry
assertelseiswhile
asyncexceptlambdawith
awaitfinallynonlocalyield
breakfornot

You can learn more about each keyword by using the help command like so:

help("async")
Python async Help output

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.

0 0 votes
Lesson Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments