Introduction to Python#

Welcome to an Introduction to Python!#

This is a compilation of course notes designed to guide users through the essential concepts, patterns, and practical skills needed to become proficient in Python. These notes originate from the upper-division CS 122 Advanced Programming in Python course at San José State University, intended for students who have experience with programming but are new to Python specifically. If you’ve previously worked with programming languages such as Java or C++ or data science software such as MATLAB or R, you will find many concepts familiar. However, Python’s unique style, philosophy, and features will offer new perspectives and capabilities.

The goal of this “book” is twofold. First, it serves as a practical guide to using Python effectively in data science applications. Second, it acts as a reference manual that highlights key libraries and tools that working Python programmers routinely rely on. These notes are not necessarily structured like a traditional textbook; instead, they are organized around topics and examples that arose naturally during the course of instruction, projects, and discussions.

I am a big Python fan because of its readability, simplicity, and flexibility. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. Unlike many languages where structure is rigidly enforced, Python gives you a degree of freedom in how you solve problems.

Because the course assumed a prior background in programming, these notes are not a beginner’s introduction to variables, loops, and if-statements. Instead, I focus on what makes Python different and what it enables. I also include notes on modern Python tools and popular libraries for data analysis, web development, and graphic user interfaces.

These notes are intended to be somewhat of a living document. As I continue to teach the CS 122 course and other like it over future semesters, updates and additions will be made to reflect best practices, new features, and emerging tools. In this way, this compilation remains not just a record of a single class, but an ongoing resource for learning and improving your Python skills.

Let’s get started!

Note

This “book” is a work in progress and will continue to be updated. If you have any feedback or constructive suggestions, feel free to submit an issue on the Github repository for this book.

Table of Contents#

Object-Oriented Programming