Python Basics – 2 Day Crash Course
1. Introduction to Python
Python is one of the most popular programming languages in the world. It is widely used in data
engineering, artificial intelligence, automation, scripting, and web development. Python is known for
its simple syntax and readability, which makes it easy for beginners to learn.
Many modern technologies such as data pipelines, AI agents, and automation frameworks use
Python as their main programming language. Companies across industries rely on Python because
it allows developers to build solutions quickly and efficiently.
For professionals working with SQL, databases, or ETL tools, Python becomes a natural extension
of their skillset. It allows you to automate repetitive tasks, interact with APIs, process files, and build
intelligent systems.
In this guide you will learn the essential Python concepts needed to start building practical solutions
in just two days of focused learning.
2. Installing Python and Setup
To start learning Python you need to install the Python interpreter on your system. The official
distribution can be downloaded from the Python website. After installation, you can run Python
scripts using the terminal or command prompt.
A popular editor used by developers is Visual Studio Code. It provides features such as syntax
highlighting, debugging, and extensions for Python development. Installing the Python extension
makes coding much easier.
Once Python is installed, you can run a simple script:
print("Hello World")
This command prints the message to the console and confirms that your environment is working
correctly.
3. Variables and Data Types
Variables are used to store values in Python. Unlike many programming languages, Python does
not require declaring a variable type explicitly.
Example: name = "Sampath" age = 30 salary = 50000
Python automatically determines the data type based on the value assigned. Common data types
include:
String – text values Integer – whole numbers Float – decimal numbers Boolean – True or False
Understanding these data types is important because they are used in conditions, loops, and
calculations.
4. Lists and Dictionaries
Lists and dictionaries are two of the most commonly used data structures in Python.
Lists store ordered collections of items.
Example: skills = ["SQL", "Python", "DBT"]
You can access elements using indexes: print(skills[0])
Dictionaries store key-value pairs.
Example: person = { "name": "Sampath", "skill": "SQL" }
Dictionaries are extremely useful when working with APIs and structured data formats like JSON.
5. Conditional Statements
Conditional statements allow programs to make decisions based on conditions.
Example:
salary = 50000
if salary > 40000: print("High salary") else: print("Low salary")
Python uses indentation instead of braces to define code blocks. This makes the code more
readable and structured.
Conditions are commonly used in automation scripts, validation logic, and business rule
implementations.
6. Loops
Loops are used when you want to repeat an action multiple times.
The for loop is commonly used to iterate through lists or sequences.
Example: for i in range(5): print(i)
Another type is the while loop:
i = 1 while i <= 5: print(i) i += 1
Loops are extremely useful for processing files, reading datasets, and automating repetitive
operations.
7. Functions
Functions allow you to organize reusable pieces of code.
Example:
def add_numbers(a, b): return a + b
result = add_numbers(10, 20) print(result)
Functions help make programs modular and easier to maintain. In real-world projects, functions are
used to structure large applications into smaller logical components.
8. File Handling
Python makes it very easy to work with files.
Example:
with open("[Link]") as f: for line in f: print(line)
File handling is widely used in data engineering tasks such as reading logs, processing CSV files,
or transforming datasets before loading them into databases.
9. Working with APIs
APIs allow applications to communicate with external systems. Python provides libraries that make
API communication very simple.
Example using requests:
import requests response = [Link]("[Link] print(response.status_code)
APIs are used in modern applications to retrieve data from services such as weather platforms,
payment systems, and AI models.
10. Next Steps for Learning
After learning the basics, the next step is to explore Python libraries used in the industry.
Important libraries include:
Pandas – data analysis and transformation Requests – API communication LangChain – building AI
agents OpenAI API – interacting with large language models
Combining Python with SQL, ETL tools, and modern AI frameworks can significantly expand your
career opportunities in data engineering and AI development.