Python Tokens
Python Tokens
What is Python?
1. Letters-A to Z,a to z
2. Digits-0 to 9
3. Special Symbols-+,-,*,%,/,//,{},[],(),# etc
4. White Spaces -blank space,new line etc
Tokens
Keywords/Reserved Words
● Keywords are the words that convey a special meaning to the language
processor.
● They can be used only for special purpose
Identifiers
Integer True
Complex
Constants/literals
4. Boolean (a=0b1101)
1. Arithmetic
2. Relational
3. Logical
Operator 4. Assignment
Types 5.
6.
Membership
Identity
7. Bitwise
8. Shift
Arithmetic
1. +
2. -
3. *
4. /
5. //
6. %
7. **
Relational
1. <
2. >
3. <=
4. >=
5. ==
6. !=
Logical
1. And
2. Or
3. not
Assignment
1. = Assignment
2. /= Assign Quotient
3. += Assign sum
4. *= Assign product
5. %= Assign remainder
6. -= Assign difference
7. **= Assign exponent
8. //= Assign floor division
Membership