🔹 Python is a high-level, interpreted programming language known for its readability and simplicity.
🔹 It was created by Guido van Rossum and first released in 1991.
🔹 Python is used in a variety of domains as shown in below diagram.
🔹 In Python, indentation (spacing at the beginning of a line) is not optional. It's mandatory and part of the syntax.
🔹 Indentation replaces the need for {} to define code blocks (like in loops or conditionals).
🔹 This forces consistent, readable code.
Python Code
if x > 0:
print("Positive") # Must be indented
C, Java and JavaScript Code
if (x > 0) {
printf("Positive");
}
🔹 Python doesn't require to declare data types (like int, float, String) when creating variables.
🔹 It figures out the type automatically when you assign a value (dynamic typing).
Python Code
x = 10 # Integer
name = "Ali" # String
C or Java Code
int x = 10;
String name = "Ali";
🔹 Python statements end with a newline, not a semicolon ;.
🔹 This makes the code cleaner and easier for beginners.
Python Code
print("Hello") # No semicolon needed
Javascript Code
console.log("Hello");
🔹 In Python, curly braces are not used.
🔹 Code blocks are defined by indentation.
🔹 In C, Java, and JavaScript, blocks are defined using {} to open and close the scope.
Python Code
for i in range(5):
print(i)
Java Code
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
🔹 Python codes are short and readable —fewer lines, fewer symbols, and simpler syntax.
🔹 It avoids extra words and punctuation, making programs shorter and easier to understand.
Python Code
print("Hello, World!")
Java Code
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Python is considered simpler because:
➊ It enforces readable structure through indentation.
➋ It avoids unnecessary syntax (no semicolons or curly braces).
➌ It removes complexity for beginners (no need to declare types).
➍ Programs are often shorter, clearer, and more focused on the logic than the syntax.
🔹 Pygame - Game Development
🔹 Flask - Web Development
🔹 TensorFlow - Machine Learning. For more info can refer at HERE!
🔹 Scrapy - Web Scraping