What are all the Reserved Keywords of Python?


Keywords of Python


The following identifiers are used as reserved words, or keywords of the language, and cannot be used as ordinary identifiers. They must be spelled exactly as written here...

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


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...

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...
Previous Post Next Post