Python Fundamentals

Learning PathSkills: Core Python 3, Python Syntax

Python Basics

This Python beginner learning path is designed to guide you through the essentials of Python programming, starting from the basics and progressing towards more advanced concepts.

Whether you’re still relatively new to programming or looking to add Python to your skill set, this path offers a comprehensive approach to make progress in your Python learning journey. Through a combination of tutorials, courses, and interactive quizzes, you’ll build a strong foundation in Python that will prepare you for more complex programming tasks and projects.

What You’ll Learn:

  • The fundamentals of Python, including its history and why it’s a popular choice
  • How to install and set up Python on your computer
  • Basic data types, variables, operators, and expressions
  • String manipulation, list and tuple operations, and working with dictionaries and sets
  • Control flow using conditional statements and loops
  • Writing and using functions, understanding namespaces, and file handling
  • Working with regular expressions, managing packages with pip, and debugging with tracebacks

Python Fundamentals

Learning Path ⋅ 30 Resources

Title image for Why Choose Python 3 (Introduction to Python 3)

Tutorial

Why Choose Python 3

An overview of the Python programming language, including a brief history of the development of Python and reasons why you might select Python as your language of choice.

Title image for Installing Python 3 (Python 3 Installation & Setup Guide)

Course

Installing Python 3

To get started working with Python, you'll need to have access to the Python interpreter. There are several common ways to accomplish this and in this course, you will learn how to install the latest version of Python on your computer.

Title image for Interacting With Python (Interacting With Python)

Tutorial

Interacting With Python

How to actually execute Python code and run Python programs using the CPython REPL, executing script files, and integrated development environments.

Title image for 11 Beginner Tips for Learning Python (Beginner Tips for Learning Python)

Course

11 Beginner Tips for Learning Python

See several learning strategies and tips that will help you jumpstart your journey towards becoming a rockstar Python programmer!

Title image for Basic Data Types in Python (Basic Data Types in Python)

Course

Basic Data Types in Python

Learn the basic data types that are built into Python, like numbers, strings, and Booleans. You'll also get an overview of Python's built-in functions.

Title image for Basic Data Types Quiz (Basic Data Types in Python)

Interactive Quiz

Basic Data Types Quiz

Title image for Variables in Python (Variables in Python)

Course

Variables in Python

Learn how every item of data in a Python program can be described by the abstract term "object," and how to manipulate objects using symbolic names called "variables."

Title image for Python Variables Quiz (Variables in Python)

Interactive Quiz

Python Variables Quiz

Title image for "Python Tricks" Email Series (Python Tricks)

Free Email Class

"Python Tricks" Email Series

Get a short & sweet Python Trick delivered to your inbox every couple of days.

Title image for Operators and Expressions in Python (Operators and Expressions in Python)

Tutorial

Operators and Expressions in Python

In Python, operators are special symbols, combinations of symbols, or keywords that designate some type of computation. You can combine objects and operators to build expressions that perform the actual computation. So, operators are the building blocks of expressions.

Title image for Strings and Character Data in Python (Strings and Character Data in Python)

Course

Strings and Character Data in Python

Learn how to use Python's rich set of operators, functions, and methods for working with strings. You'll learn how to access and extract portions of strings, and also become familiar with the methods that are available to manipulate and modify string data in Python 3.

Title image for Python Strings Quiz (Strings and Character Data in Python)

Interactive Quiz

Python Strings Quiz

Title image for Lists and Tuples in Python (Lists and Tuples in Python)

Course

Lists and Tuples in Python

See the important characteristics of lists and tuples in Python 3. You'll learn how to define them and how to manipulate them. When you're finished, you'll have a good feel for when and how to use these object types in a Python program.

Title image for Lists & Tuples Quiz (Lists vs Tuples in Python)

Interactive Quiz

Lists & Tuples Quiz

Title image for Dictionaries in Python (How to Iterate Through a Dictionary in Python)

Course

Dictionaries in Python

In this course on Python dictionaries, you'll cover the basic characteristics of dictionaries and learn how to access and manage dictionary data. Once you've finished this course, you'll have a good sense of when a dictionary is the appropriate data type to use and know how to use it.

Title image for Dictionaries Quiz (Dictionaries in Python)

Interactive Quiz

Dictionaries Quiz

Title image for Sets in Python (Sets in Python)

Course

Sets in Python

Learn how to work with Python's set data type. You'll see how to define set objects in Python and discover the operations that they support. By the end of this course, you'll have a good feel for when a set is an appropriate choice in your own programs.

Title image for Sets Quiz (Sets in Python)

Interactive Quiz

Sets Quiz

Title image for Python Program Lexical Structure (Python Program Lexical Structure)

Tutorial

Python Program Lexical Structure

In this tutorial you'll dig deeper into Python's lexical structure and start arranging code into more complex groupings. You'll learn about the syntactic elements that comprise statements, the basic units that make up a Python program.

Title image for Conditional Statements in Python (if/elif/else) (Conditional Statements in Python)

Course

Conditional Statements in Python (if/elif/else)

Learn how to work with conditional ("if") statements in Python. Master if-statements step-by-step and see how to write complex decision making code in your programs.

Title image for Conditional Statements Quiz (Conditional Statements in Python)

Interactive Quiz

Conditional Statements Quiz

Title image for "while" Loops in Python (Indefinite Iteration) (Python "while" Loops (Indefinite Iteration))

Course

"while" Loops in Python (Indefinite Iteration)

Master indefinite iteration using the Python "while" loop. You’ll be able to construct basic and complex while loops, interrupt loop execution with break and continue, use the else clause with a while loop, and deal with infinite loops.

Title image for While Loops Quiz (Python "while" Loops (Indefinite Iteration))

Interactive Quiz

While Loops Quiz

Title image for "for" Loops in Python (Definite Iteration) (Python "for" Loops (Definite Iteration))

Course

"for" Loops in Python (Definite Iteration)

Learn all about how to perform definite iteration with Python "for" loops. You’ll see how other programming languages implement definite iteration, learn about iterables and iterators, and tie it all together to learn about Python’s for loop.

Title image for Understanding Python List Comprehensions (When to Use a List Comprehension in Python)

Course

Understanding Python List Comprehensions

Python list comprehensions make it easy to create lists while performing sophisticated filtering, mapping, and conditional logic on their members. In this course, you'll learn when to use a list comprehension in Python and how to create them effectively.

Title image for Python Booleans: Leveraging the Values of Truth (Python Booleans: Optimize Your Code With Truth Values)

Course

Python Booleans: Leveraging the Values of Truth

Learn about the built-in Python Boolean data type, which is used to represent the truth value of an expression. You'll see how to use Booleans to compare values, check for identity and membership, and control the flow of your programs with conditionals.

Title image for Reading Input and Writing Output in Python (Basic Input, Output, and String Formatting in Python)

Course

Reading Input and Writing Output in Python

In this introductory Python course, you'll learn how to take user input from the keyboard with the built-in function input() and how to display output to the console with the built-in function print().

Title image for The Python print() Function: Go Beyond the Basics (The Ultimate Guide to Python Print)

Course

The Python print() Function: Go Beyond the Basics

Learn about the print() function in Python and discover some of its lesser-known features. Avoid common mistakes, take your "hello world" to the next level, and know when to use a better alternative.

Title image for Formatting Python Strings (A Guide to the Newer Python String Format Techniques)

Course

Formatting Python Strings

See two items to add to your Python string formatting toolkit. You'll learn about Python's string format method and the formatted string literal, or f-string. You'll learn about these formatting techniques in detail and add them to your Python string formatting toolkit.

Title image for Defining and Calling Python Functions (Defining Your Own Python Function)

Course

Defining and Calling Python Functions

Learn how to define and call your own Python function. You'll also learn about passing data to your function and returning data from your function back to its calling environment.

Title image for Using the Python return Statement Effectively (The Python return Statement: Usage and Best Practices)

Course

Using the Python return Statement Effectively

Learn how to use the Python return statement when writing functions. Additionally, you'll cover some good programming practices related to the use of return. With this knowledge, you'll be able to write readable, robust, and maintainable functions in Python.

Title image for Regular Expressions (Part 1) (Regular Expressions: Regexes in Python (Part 1))

Course

Regular Expressions (Part 1)

Learn how to perform more complex string pattern matching using regular expressions, or regexes, in Python. You'll also explore more advanced regex tools and techniques that are available in Python.

Title image for Regular Expressions (Part 2) (Regular Expressions: Regexes in Python (Part 2))

Tutorial

Regular Expressions (Part 2)

In the previous tutorial in this series, you learned how to perform sophisticated pattern matching using regular expressions, or regexes, in Python. This tutorial explores more regex tools and techniques that are available in Python.

Title image for Navigating Namespaces and Scope in Python (Namespaces and Scope in Python)

Course

Navigating Namespaces and Scope in Python

Learn about Python namespaces, the structures used to store and organize the symbolic names created during execution of a Python program. You'll learn when namespaces are created, how they are implemented, and how they define variable scope.

Title image for Reading and Writing Files in Python (Reading and Writing Files in Python (Guide))

Course

Reading and Writing Files in Python

Learn about reading and writing files in Python. You'll cover everything from what a file is made up of to which libraries can help you along that way. You'll also take a look at some basic scenarios of file usage as well as some advanced techniques.

Title image for Getting the Most Out of a Python Traceback (Understanding the Python Traceback)

Course

Getting the Most Out of a Python Traceback

Learn how to read and understand the information you can get from a Python stack traceback. You'll walk through several examples and see some of the most common tracebacks in Python.

Title image for A Beginner's Guide to pip (What Is pip? A Guide for New Pythonistas)

Course

A Beginner's Guide to pip

What is pip? In this beginner-friendly course, you'll learn how to use pip, the standard package manager for Python, so that you can install and manage additional packages that are not part of the Python standard library.

Title image for Continue Your Python Journey With "Python Basics" (Python Basics Book)

Learning Path

Continue Your Python Journey With "Python Basics"

Your complete Python curriculum—with exercises, interactive quizzes, and sample projects.

Got feedback on this learning path?

Looking for real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!

« Browse All Learning Paths