Veda Bites are swipeable micro-lessons — each one teaches exactly one
idea. The bites below come from this kit — swipe through them in the app.
💡 Key Idea
Python Code = Character Set → Tokens → Statements
Every Python program is built from these 3 layers.
Python code is constructed hierarchically: the character set provides valid characters, tokens are the smallest meaningful units, and statements are built from tokens.
↳ Mastering tokens is the key to understanding Python syntax.
📖 Definition
What Is a Character Set?
Python only recognizes these characters.
↳ Any character outside the Python character set is invalid in source code.
📖 Definition
What Is a Token?
Tokens are Python's smallest meaningful units.
↳ Every Python statement is a sequence of tokens.
⭐ Important Fact
Python Has 35 Keywords
35 reserved words you cannot use as names.
Python has exactly 35 keywords — all lowercase except `False`, `True`, and `None`.
↳ Using a keyword as a variable name causes a syntax error.
⚖️ Comparison
Keywords vs Identifiers
One is reserved, the other is yours to name.
↳ Keywords are fixed; identifiers are user-defined and must follow naming rules.
⚙️ Process
Rules for Naming Identifiers
Break these rules and Python throws an error.
↳ Valid identifiers: myVar, _count, Ab123. Invalid: 1var, my-var, for.
⚠️ Common Mistake
Identifiers Cannot Start with a Digit
1var is invalid — here's why.
↳ Digits are allowed inside identifiers, just not as the first character.
📖 Definition
What Is a Literal?
Literals are the fixed values in your code.
↳ In `a = 10`, the value `10` is a numeric literal.
⭐ Important Fact
Three Types of Integer Literals
Python integers come in 3 flavors.
↳ Integer literals can be written in decimal, octal, or hexadecimal notation.
📖 Definition
What Is a Variable?
A variable is a labeled box in memory.
Think of a variable as a container with a label (the name) and contents (the value).
↳ Variables let programs store, retrieve, and update data during execution.
⚙️ Process
How to Assign Values to Variables
Python creates variables on first assignment.
↳ Python declares and initializes variables in a single assignment statement.
⭐ Important Fact
Multiple Assignments in One Line
Assign many variables in one statement.
↳ Python supports chained and unpacked assignments for concise code.
⚠️ Common Mistake
Python Is Case-Sensitive
Name and name are two different variables.
↳ Case-sensitivity is a common source of bugs for beginners.
📖 Definition
What Is an Operator?
Operators act on operands to produce results.
↳ Operators are the verbs of programming — they do things to values.
📖 Definition
What Are Punctuators?
Punctuators structure your Python code.
↳ Punctuators give structure to code — they don't perform operations.
🎯 Exam Tip
Exam Tip: Valid vs Invalid Identifiers
Spot the invalid name in seconds.
↳ Check the first character and keyword status — that catches most invalid identifiers.
🧠 Memory Trick
Remember the 5 Token Types
KILOP — five tokens, one acronym.
Use KILOP to recall the 5 Python token types:
↳ KILOP = Keywords, Identifiers, Literals, Operators, Punctuators.