Python: Where to Start and Where It Can Take You | Codeverra
Lecture 01 / Python Fundamentals

Python: Where to Start
and Where It Can Take You

A complete introduction to why Python matters, how to set it up, the basics of its syntax, and an honest roadmap of everything that lies ahead for you.

Series Python Fundamentals
Level Absolute Beginner
Read time 20 min

Why Python is the Language to Learn Right Now

Every few years, a programming language rises to the top of developer surveys and job listings in a way that is hard to ignore. Python has been doing this consistently since 2015, and in 2024 it sits at number one on the TIOBE index, the Stack Overflow developer survey, and nearly every "most in-demand languages" ranking published by hiring platforms.

Python is not just a language. It is the lingua franca of modern computing - from a five-line script to systems running at Google, ISRO, and Netflix.

Here is what actually drives that popularity:

It reads like English

Python was designed with one philosophy at its core: code should be easy to read. Guido van Rossum, who created Python in 1991, believed that code is read far more often than it is written. The result is a language where you spend less time fighting syntax and more time solving actual problems.

# Calculate GST for a list of prices - this almost reads like a sentence
prices = [299, 499, 1299, 2499]
with_gst = [round(price * 1.18, 2) for price in prices]
print(with_gst)
# [352.82, 588.82, 1532.82, 2948.82]
Python

One language, every domain

Most languages have a primary domain. Java is enterprise backend. JavaScript is the web. C++ is systems programming. Python refuses to be boxed in. The same language powers Zomato's recommendation engine, ISRO's satellite telemetry processing, a data analyst's quarterly sales report, and the fine-tuning of large language models. You learn it once and it opens multiple doors.

The ecosystem is unmatched

Python has over 400,000 packages on PyPI. Libraries like NumPy, Pandas, Scikit-learn, TensorFlow, FastAPI, and Django represent hundreds of thousands of engineering hours distilled into tools you can import in one line. Whatever problem you are trying to solve, someone has almost certainly built a Python library for it.

The job market is real

As of 2024, Python is required or preferred in the majority of data science, machine learning, backend engineering, and automation job postings in India and globally. Companies like Swiggy, Meesho, Razorpay, PhonePe, and nearly every product startup in Bangalore list Python as a core skill. The demand is not abstract - it is in active job listings right now.

Note for beginners

You do not need to understand data science or machine learning to start with Python. The fundamentals you learn in the first few weeks apply equally whether you end up in web development, analytics, or AI. Start here. Specialise later.


Python vs Other Popular Languages

Understanding where Python fits relative to other languages helps you make an informed decision about what to learn and why. This is not about declaring one language "better" - every language was built to solve specific problems. It is about understanding the trade-offs.

LanguagePrimary UseLearning CurveSpeedvs Python
PythonData, AI/ML, Backend, AutomationLowModerateThe baseline
JavaScriptWeb frontend, Node.js backendLowModerateDominates the browser; Python dominates data
JavaEnterprise backend, AndroidMediumFastMore verbose; Python is faster to write
C / C++Systems, embedded, game enginesHighVery FastPython is 10-100x slower but 10x faster to write
RStatistical computing, researchMediumModeratePython has surpassed R for most data science work
SQLDatabase queriesLowFastNot a general language; Python and SQL are used together

The honest trade-off: Speed vs Productivity

Python is interpreted, dynamically typed, and runs slower than compiled languages like C++ or Java. For building a video game engine or an operating system kernel, Python is the wrong choice. But for data analysis, web APIs, machine learning pipelines, and automation scripts - which is where most software jobs actually are - Python's development speed far outweighs its execution speed disadvantage. And when raw performance is needed, Python code calls into C libraries like NumPy under the hood anyway.

The Python + SQL combination

If you are heading toward data analytics or data engineering, Python and SQL together are far more powerful than either alone. SQL handles what lives in databases. Python handles everything else. Both are covered in the Codeverra curriculum.


Setting Up Python and Jupyter Notebook

Getting Python running on your machine takes about ten minutes. There are two things to install: Python itself, and Jupyter Notebook - the interactive environment we will use for all exercises.

Step 1: Install Python

  1. Download Python

    Go to python.org/downloads and download the latest stable version (3.12 or newer). On Windows, make sure to check "Add Python to PATH" during installation. On macOS and Linux, Python may already be installed - run python3 - version in your terminal to check.

  2. Verify the installation

    Open a terminal (Command Prompt on Windows, Terminal on Mac/Linux) and run:

python - version
# Expected: Python 3.12.x (or newer)

python -c "print('Python is working!')"
# Expected: Python is working!
Shell

Step 2: Install Jupyter via pip

pip is Python's package manager. It is installed automatically with Python. Use it to install Jupyter:

pip install notebook
# This installs Jupyter Notebook and all its dependencies
Shell

Step 3: Launch Jupyter Notebook

jupyter notebook
# Opens a browser tab at http://localhost:8888
# Navigate to a folder and click "New > Python 3" to create your first notebook
Shell
Alternative: Anaconda Distribution

If you prefer an all-in-one installer, Anaconda bundles Python, Jupyter, and 250+ data science libraries. Download it at anaconda.com. Recommended if you plan to focus on data science or machine learning.

Why Jupyter Notebook?

Jupyter lets you write and run Python code in small, isolated cells. You see the output immediately below each cell. This makes it ideal for learning because you can experiment, make mistakes, and observe results without running an entire file each time. It is also the standard tool used by data analysts and data scientists worldwide.

Your First Cell

Once Jupyter is open, create a new notebook and type this in the first cell, then press Shift + Enter to run it:

# Your first Python program
name = "Aarav"
city = "Bangalore"
print(f"Hello! My name is {name} and I am from {city}.")

# Output: Hello! My name is Aarav and I am from Bangalore.
Python

If you see the output, your setup is complete.


Python Syntax and the Rules You Need to Know

Every language has grammar rules. Python's rules are minimal but strict in certain areas. Understanding them from day one saves you hours of debugging confusing errors later.

Indentation is structure

Python uses indentation (4 spaces, not tabs) to define code blocks. There are no curly braces. Get this wrong and your code either fails or does something unintended.

Case sensitivity

name, Name, and NAME are three different variables. Python is case-sensitive everywhere.

No semicolons needed

Each statement goes on its own line. Semicolons are valid but never required and rarely used in Python code.

Comments with #

Anything after a # on a line is a comment. Python ignores it. Use comments liberally to explain your thinking.

Variable naming rules

Start with a letter or underscore. No spaces. No special characters. Use lowercase with underscores: student_name, not StudentName.

Dynamic typing

You do not declare a variable's type. Python figures it out from the value you assign. x = 5 makes x an integer. x = "hello" makes x a string.

Indentation in Practice

This is the most important rule to internalize early. Here is what correct and incorrect indentation looks like:

# CORRECT - consistent 4-space indentation
score = 85

if score >= 60:
 print("Passed") # 4 spaces in
 if score >= 85:
 print("Distinction") # 8 spaces in (nested block)
else:
 print("Failed") # 4 spaces in

# WRONG - mixing indentation levels causes IndentationError
if score >= 60:
 print("Passed") # 2 spaces - inconsistent!
 print("Continuing...") # 6 spaces - IndentationError
Python

Variables and Assignment

# Assigning values
student_name = "Priya Sharma"
age = 21
gpa = 8.7
is_enrolled = True

# Multiple assignment in one line
x, y, z = 10, 20, 30

# Reassigning changes the type - this is valid in Python
value = 42 # integer
value = "hello" # now a string - Python allows this

# Check the type of any variable
print(type(age)) # <class 'int'>
print(type(gpa)) # <class 'float'>
Python

Printing Output

# Basic print
print("Namaste, World!")

# Print multiple values
print("Name:", student_name, "| Age:", age)

# f-string formatting - the modern, preferred way
print(f"{student_name} is {age} years old with a GPA of {gpa}.")

# Format numbers inside f-strings
price = 1234567.89
print(f"Price: Rs.{price:,.2f}") # Rs.1,234,567.89
Python

Basic Data Types in Python

A data type tells Python what kind of value a variable holds and what operations are allowed on it. Python has a handful of built-in types that cover the vast majority of what you will work with in the beginning. Here is an overview before we go into each one:

int Integer age = 21

Whole numbers, positive or negative, no decimal point.

float Floating Point price = 299.99

Numbers with a decimal component. Used for measurements and money.

str String city = "Delhi"

Text data. Any sequence of characters inside quotes.

bool Boolean active = True

Only two values: True or False. The foundation of all conditions.

NoneType None result = None

Represents the intentional absence of a value. Not zero, not empty - nothing.

complex Complex z = 3 + 4j

Complex numbers with real and imaginary parts. Used in scientific computing.

Integers and Floats

# Integers - no limit on size in Python
population = 1_428_627_663 # underscores allowed for readability
odi_centuries = 50

# Floats
gst_rate = 0.18
ipl_fee = 1_294_000_000.00

# Arithmetic operators
print(10 + 3) # 13 addition
print(10 - 3) # 7 subtraction
print(10 * 3) # 30 multiplication
print(10 / 3) # 3.333... always returns float
print(10 // 3) # 3 floor division (integer result)
print(10 % 3) # 1 modulo (remainder)
print(10 ** 3) # 1000 exponentiation
Python

Strings

# Creating strings
name = "Rohan Mehta"
city = 'Hyderabad' # single or double quotes, both work
address = """
123, MG Road,
Bangalore - 560001
""" # triple quotes for multiline strings

# Common string operations
print(len(name)) # 11 - length of string
print(name.upper()) # ROHAN MEHTA
print(name.lower()) # rohan mehta
print(name.replace("Mehta", "Sharma")) # Rohan Sharma
print(name.split(" ")) # ['Rohan', 'Mehta']

# Indexing and slicing
print(name[0]) # R - first character
print(name[-1]) # a - last character
print(name[0:5]) # Rohan - slice
Python

Booleans and Comparison

# Boolean values
is_registered = True
has_paid = False

# Comparison operators return booleans
print(10 > 5) # True
print(10 == 10) # True - note: == not =
print(10 != 5) # True
print(10 >= 10) # True
print(10 < 5) # False

# Logical operators
print(True and False) # False
print(True or False) # True
print(not True) # False

# Real use case
age = 22
has_degree = True

eligible = age >= 21 and has_degree
print(eligible) # True
Python

Type Conversion

# Convert between types explicitly
age_str = "25"
age_int = int(age_str) # string to int

price_int = 299
price_float = float(price_int) # int to float: 299.0

score_float = 87.9
score_int = int(score_float) # float to int: 87 (truncates, does NOT round)

number = 42
number_str = str(number) # int to string: "42"

# Common pattern: reading user input (always a string, must be converted)
age = int(input("Enter your age: "))
Python

The Complete Python Learning Roadmap

This is the map we will follow together at Codeverra. Every lesson, practice sheet, and masterclass published on this site corresponds to a node on this roadmap. Bookmark this page.

Click a phase tab to explore what you will learn and what resources are available for that phase.

01

Python Foundations

The building blocks that everything else depends on. Master these before moving forward.

Why Python and setting up your environment This Article
Basic data types: int, float, str, bool, None This Article
Variables, assignment, and naming conventions This Article
Operators: arithmetic, comparison, logical Lecture 01
Input and output: print(), input(), f-strings Lecture 01
Type conversion: int(), float(), str() Lecture 01
Control flow: if, elif, else Lecture 02
Loops: for, while, break, continue, range() Lecture 03
Available on Codeverra
02

Core Python

The essential Python toolkit that professional developers use every day.

Collections: List, Tuple, Dictionary, Set Practice Available
List comprehensions and dict comprehensions Practice Available
Functions: def, parameters, return values Practice Available
*args, **kwargs, default parameters Practice Available
Scope, closures, and higher order functions Practice Available
Lambda, map(), filter(), reduce() Practice Available
Decorators: basic, with arguments, chaining Practice Available
Exception handling: try, except, finally, raise Coming Soon
File handling: reading, writing, with statement Coming Soon
Modules and packages: import, pip, venv Coming Soon
Available on Codeverra
03

Data Tools and Object-Oriented Python

The libraries and patterns that connect foundational Python to real-world work.

Object-Oriented Programming: classes and objects Coming Soon
Inheritance, encapsulation, polymorphism Coming Soon
NumPy: arrays, operations, linear algebra Masterclass Available
Pandas: DataFrames, cleaning, GroupBy, merge Masterclass Available
Matplotlib and Seaborn: data visualisation Coming Soon
SQL with Python: sqlite3, SQLAlchemy, psycopg2 Separate SQL Series
Working with APIs: requests, JSON, REST Coming Soon
Itertools, functools, and collections modules Coming Soon
Available on Codeverra
04

Specialisations

After Phase 3, you have enough to choose a direction. Each path builds on the same core.

Analytics

Data Analyst

Turn raw data into decisions. Heavy use of SQL, Pandas, Excel, and visualisation tools. Often the fastest path to a first data job.

Pandas SQL Matplotlib Seaborn Power BI / Tableau Statistics
Science

Data Scientist

Build predictive models and extract deeper insight from data. Requires stronger statistics and machine learning foundations.

NumPy Pandas Scikit-learn Statistics Feature Engineering Experiment Design
ML / AI

ML Engineer

Build, train, and deploy machine learning models at scale. Bridges data science and software engineering.

PyTorch / TensorFlow MLflow Docker FastAPI Cloud (AWS/GCP) MLOps
AI / LLM

AI / LLM Engineer

Build applications powered by large language models. One of the fastest-growing roles in tech as of 2024.

LangChain OpenAI API RAG Vector DBs Prompt Engineering Fine-tuning
Backend

Backend Engineer

Build the APIs and server-side logic that power web and mobile applications. Python's frameworks are production-grade and widely used.

FastAPI Django PostgreSQL Redis Docker REST / GraphQL
Engineering

Data Engineer

Build the pipelines that move and transform data at scale. Combines Python, SQL, and cloud infrastructure.

Apache Spark Airflow dbt Kafka BigQuery / Redshift ETL Pipelines
Note on specialisation timing

Where to Go From Here

You now have Python installed, an understanding of its syntax, a working knowledge of its basic data types, and a clear map of where this journey leads. That is more than most beginners have before writing their first line of code.

The next lecture covers control flow - if/elif/else conditions and how to make your programs make decisions. After that, loops. Then collections. Each concept builds on the last. The roadmap above shows exactly where each piece fits.

The single best thing you can do right now is open Jupyter, type out the code examples in this article by hand (not copy-paste), and run them. Understanding comes from doing, not reading.

Every practice sheet, masterclass, and project on Codeverra is designed to fit into one of the four phases on the roadmap. When you complete a resource, come back to this page and see which box it fills. That progress tracking will keep you oriented as the curriculum grows.