Python is a widely-used programming language, celebrated for its simplicity, comprehensive features, and extensive library support. This "Last Minute Notes" article aims to offer a quick, concise overview of essential Python topics, including data types, operators, control flow statements, functions, and Python collections.
Table of Content
Introduction to Python
First Python Program
Below is a simple Python Program to print "Hello World!":
print("Hello World!")
Output
Hello World!
Indentation
In Python, indentationdefines code blocks. It groups statements with the same indentation level using spaces or tabs, to indicate they belong together.
if 10 > 5:
print("This is true!")
print("I am tab indentation")
print("I have no indentation")
Output
This is true! I am tab indentation I have no indentation
The first two print statements are indented by 4 spaces, indicating they are part of the if block.
Keywords in Python
| True | False | None | and |
| or | not | is | if |
| else | elif |