Python Keywords

Python Keywords:

● In Python, the reserved words are called "keywords". They define Python's syntax and structure. Keywords in Python are case sensitive. All of the keywords are lowercase except True, False, and None. 

● Python 3.10.1 has 35 keywords.

'False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'

Python program that prints the complete list of keywords

No alt text provided for this image

Variable-related keywords include the following:

  'global', 'nonlocal'

Functions-related keywords include the following:   

  'def', 'lambda', 'return', 'with', 'yield'

Class-related keywords include the following: 

  'class'

Constants-related keywords include the following: 

   'True', 'False', 'None'

Flow controls-related keywords include the following: 

  'if', 'else','elif', 'for', 'break', 'continue', 'pass', 'while'

Module-related keywords include the following: 

  'import', 'from', 'as'

Logical-related keywords include the following:

  'and', 'or', 'not'

Checking-related keywords include the following:

  'in', 'is'

Exception handling-related keywords include the following:

  'try', 'except', 'finally', 'raise', 'assert'

Asynchronous-related keywords include the following:

  'async', 'await'

Delete-related keywords include the following:

  'del'

To view or add a comment, sign in

More articles by Siva Velivelli

  • Python Data Types - Part 1

    Python Data Types ● Python has a number of built-in data types that can be used to store data. ● A data type is the…

  • Python Identifiers

    Python Identifiers: ● In Python programming, a name is referred to as an identifier. It could be a Class Name, a…

    1 Comment
  • Python Features

    @author: Siva Velivelli Python Features 1. Simple and easy to learn: ● The statements in the Python program look like…

  • How does the Python interpreter work?

    @author: Siva Velivelli How does the Python interpreter work? ● When we run source code (a file with a .py extension)…

  • Python Introduction and Applications

    @author: Siva Velivelli Python Introduction 1. Python is a general-purpose, high-level, and interpreted programming…

Explore content categories