Reserved Words in Computer Programming
1 min readJun 16, 2021
This article tells you
- What are reserved words in computer programming?
- How to get a list of reserved words for Python (and other languages)
- How to work around reserved words
What are reserved words in computer programming?
Reserved words are words that you, the user, cannot define in a programming language. They are part of the language specifications and will always do exactly what the language intends for them to do. A few examples are
- if
- and
- or
- else
- return
- (and many more)
How to get a list of reserved words for Python (and other languages)
I’m assuming that you have downloaded Python. If so, you can follow along with this Gist:
In order to get a list of reserved words for other languages, one simple way is to just Google, “Keywords for <Language>” or “Reserved words for <Language>”
How to work around reserved words
Here is an example of how to work around the reserved word, “else” in the Python REPL:
If you’ve gotten this far, I salute you for reading all the way to the end! Stay tuned for the next article!