Introduction to Python
Learning Path ⋅ Skills: Core Python 3, Python Syntax
Learn fundamental concepts for Python beginners that will help you get started on your journey to learn Python. These tutorials focus on the absolutely essential things you need to know about Python.
What You’ll Learn:
- Installing a Python environment
- The basics of the Python language
Introduction to Python
Learning Path ⋅ 30 Resources
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.
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.
Interacting With Python
How to actually execute Python code and run Python programs using the CPython REPL, executing script files, and integrated development environments.
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!
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.
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."
Free Email Class
"Python Tricks" Email Series
Get a short & sweet Python Trick delivered to your inbox every couple of days.
Operators and Expressions in Python
You'll see how calculations can be performed on objects in Python. By the end of this tutorial, you will be able to create complex expressions by combining Python objects and operators.
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.
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.
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.
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.
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.
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.
"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.
"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.
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.
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.
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().
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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!