1 of 2

Notes – Introduction to Python

What is Python?

Python is a high-level, interpreted programming language known for its simplicity and readability. It is widely used in various domains, including:

  • Web Development
  • Data Science
  • Machine Learning & AI
  • Automation & Scripting
  • Game Development
  • Cybersecurity

Why Learn Python?

Python is popular because of:

  • Easy to Learn – Simple syntax similar to English.
  • Versatile – Can be used for web, data, AI, and more.
  • Large Community – Millions of developers worldwide.
  • Extensive Libraries – Built-in modules for faster development.
  • Cross-Platform – Works on Windows, macOS, and Linux.

Features of Python


FeatureDescription
Simple & ReadableUses indentation instead of curly brackets {}.
InterpretedNo need to compile; executed line by line.
Dynamically TypedNo need to declare variable types.
Object-OrientedSupports classes and objects.
Extensive LibrariesIncludes libraries like NumPy, Pandas, and Django.

Python vs Other Languages


FeaturePythonJavaC++
SyntaxSimple, easy to readVerbose, requires semicolonsComplex syntax
SpeedSlower (interpreted)Faster (compiled)Faster (compiled)
Use CasesAI, Web, Data ScienceEnterprise, WebGame Development, Performance Apps

Where is Python Used?

  • Google – Uses Python for AI and web services.
  • Netflix – For recommendation algorithms.
  • NASA – Space exploration and simulations.
  • Instagram – Built using Python’s Django framework.

How to Install Python?

  1. Download Python from python.org
  2. Install it by following the setup wizard.
  3. Verify installation by running python --version in the terminal.

First Python Program

Here’s a simple Python program to print a message:

print("Hello, World!")

Explanation:

  • print() is a built-in function that displays output.
  • The text inside "" (quotes) is printed on the screen.