PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Python · Theory

Python Keywords

← All stacks

Theory

9/268

Python Keywords

Keywords are reserved words. Python already uses them, so you cannot use them as variable names. if, else, for, while, def, class, return, import, try, except, True, False, None — these are the everyday ones.

True, False, None start with a capital letter. Writing true is a NameError. class = 5 is illegal. int = 5 is allowed but ugly — don’t shadow built-in names. help("keywords") lists them if you forget.

Viva — “keyword means reserved”. Then list six. Don’t invent new keywords.

Python Keywords — output — True is a keyword. True/False/None start with a capital letter.

Exam tip

Define keyword + six everyday examples.

Example

# Keywords
ok = True
if ok:
    print("True is a keyword")

Python Keywords — output: True is a keyword. True/False/None start with a capital letter.

Short notes

  • DefReserved words. Not variable names.
  • RuleTrue False None are capital.
  • Rememberif / def / class / return.
  • TrapUsing class as a variable.

Questions

1

Explain Keywords as if you are teaching a junior — definition, then one tiny script.

2

What does the example print, and why?

3

What mistake do freshers make with Keywords?

Previous← Python SyntaxNextPython Literals →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.