Basic Python – Part 1 – Keywords in Python

In this article, we’ll learn about Keywords in Python, what are they, and how to use them

if you missed out on the previous articles in this series, you can check them out here:

  1. Part 0 – Setting up your Python code

What are these Keywords in Python?

There are some special words in Python which have some purpose and cannot be used as normal variables or function names. Let me explain.

Let’s say we have these words – True, Correct, and Right. We know all of them to mean the same thing which is positive. Let us type these words in Google Colab and see what happens.

Clearly, we can see that “True” is highlighted, whereas other words are just normal. Similarly, there are so many other keywords, the entire list is here

Few of them:

We can notice here that the color is different for different words, we’ll more about the uses of keywords in the upcoming articles. For now, all you should remember is there are some special words in Python with some special purpose.

You’ll get something like this:

How to use these Keywords?

Attaching a few examples of how to use these keywords, most of them are self-explanatory

, have a look at them.

Don’t get panicked looking at the “==” symbol, it is called the “equal to” operator, we’ll learn about these operators in the next article. Few more examples:

Congrats! You have just learned about keywords in Python, now let’s learn about the operators in our next article.

If you want to get the latest updates on my website about new posts, join the Telegram channel here

t.me/davidgladson

[post-views]

Scroll to Top