Definition
📌 Introduction
Python, created by Guido van Rossum and first released in 1991, is known for clean, readable syntax that reads almost like English.
Syntax
syntax
# comments start with #
print("your code here")Example
py
print("Hello, World!")Output
outputHello, World!
Important Points
- Python has no required boilerplate — a script can be a single line.
- Indentation (usually 4 spaces) defines code blocks instead of
{}. - Python is dynamically typed — you don't declare a variable's type explicitly.
- Python code runs through an interpreter, line by line, rather than being compiled ahead of time.
Common Mistakes
- Mixing tabs and spaces for indentation, which Python treats as an error.
- Forgetting the colon
:at the end of a block header likeiforfor. - Assuming Python needs a
main()function like C/Java — it doesn't.
Interview Tip
🎯 Before your interview
"Is Python compiled or interpreted?" — Python source is technically compiled to bytecode internally, but is commonly described as an interpreted language since there's no separate manual compile step.
