Real Python
  • Start Here
  • Learn Python
    Python Tutorials →
    In-depth articles and video courses
    Learning Paths →
    Guided study plans for accelerated learning
    Quizzes & Exercises →
    Check your learning progress
    Browse Topics →
    Focus on a specific area or skill level
    Community Chat →
    Learn with other Pythonistas
    Office Hours →
    Live Q&A calls with Python experts
    Podcast →
    Hear what’s new in the world of Python
    Books →
    Round out your knowledge and learn offline
    Reference →
    Concise definitions for common Python terms
    Code Mentor →Beta
    Personalized code assistance & learning tools
    Unlock All Content →
  • More
    Learner Stories Python Newsletter Python Job Board Meet the Team Become a Tutorial Writer Become a Video Instructor
  • Search
/
  • Join
  • Sign‑In

— FREE Email Series —

🐍 Python Tricks 💌

Python Tricks Dictionary Merge

🔒 No spam. Unsubscribe any time.

Browse Topics Guided Learning Paths
Basics Intermediate Advanced
ai algorithms api best-practices career community databases data-science data-structures data-viz devops django docker editors flask front-end gamedev gui machine-learning news numpy projects python stdlib testing tools web-dev web-scraping

Table of Contents

  • Python Keywords
  • Python Soft Keywords
  • Value Keywords: True, False, None
    • The True and False Keywords
    • The None Keyword
  • Operator Keywords: and, or, not, in, is
    • The and Keyword
    • The or Keyword
    • The not Keyword
    • The in Keyword
    • The is Keyword
  • Control Flow Keywords: if, elif, else
    • The if Keyword
    • The elif Keyword
    • The else Keyword
  • Iteration Keywords: for, while, break, continue, else
    • The for Keyword
    • The while Keyword
    • The break Keyword
    • The continue Keyword
    • The else Keyword Used With Loops
  • Structure Keywords: def, class, with, as, pass, lambda
    • The def Keyword
    • The class Keyword
    • The with Keyword
    • The as Keyword Used With with
    • The pass Keyword
    • The lambda Keyword
  • Returning Keywords: return, yield
    • The return Keyword
    • The yield Keyword
  • Import Keywords: import, from, as
    • The import Keyword
    • The from Keyword
    • The as Keyword
  • Exception-Handling Keywords: try, except, raise, finally, else, assert
    • The try Keyword
    • The except Keyword
    • The raise Keyword
    • The finally Keyword
    • The else Keyword Used With try and except
    • The assert Keyword
  • Asynchronous Programming Keywords: async, await
    • The async Keyword
    • The await Keyword
  • Variable Handling Keywords: del, global, nonlocal
    • The del Keyword
    • The global Keyword
    • The nonlocal Keyword
  • Soft Keywords and Their Usage
    • The match, case, and _ Soft Keywords
    • The type Soft Keyword
  • How to Identify Python Keywords
    • Leverage the Syntax Highlighting of Your IDE
    • Use Code in a REPL to Check Keywords
    • Look for a SyntaxError
  • Deprecated Python Keywords
    • The Former print Keyword
    • The Former exec Keyword
  • Conclusion
  • Frequently Asked Questions

Recommended Video Course
Exploring Keywords in Python