Search This Blog

Wednesday, 15 December 2021

What are keywords in python and how to use them

 

Python Keywords

free portfolio web templates

There is one more restriction on identifier names. The Python language reserves a small set of keywords that designate special language functionality. No object can have the same name as a reserved word.

In Python 3.6, there are 33 reserved keywords

You can see this list any time by typing help("keywords") to the Python interpreter. Reserved words are case-sensitive and must be used exactly as shown. They are all entirely lowercase, except for False, None, and True. 

Trying to create a variable with the same name as any reserved word results in an error:
>>> for = 3
SyntaxError: invalid syntax

No comments:

Post a Comment

how to implement YOLOv3 using Python and TensorFlow

Object Detection with YOLOv3 Introduction YOLOv3 (You Only Look Once version 3) is a real-time object detection algorithm that can detect ob...