Start your Python journey by mastering the essentials of programming, from installing your tools to working confidently with core data types and control flow. Build a strong foundation in Python syntax, variables, functions, strings, and data structures to prepare for more advanced programming challenges.

Python Foundations: From Setup to Data Structures
Grow on your schedule with big savings on Coursera Plus. Save 40% for 3 months.

Python Foundations: From Setup to Data Structures
This course is part of Learn to Code with Python Specialization

Instructor: Packt - Course Instructors
Included with •Learn more
Recommended experience
Recommended experience
What you'll learn
Install and configure Python on macOS and Windows
Implement object-oriented programming using classes and inheritance
Create and manage variables, functions, and data types
Details to know

Add to your LinkedIn profile
August 2026
20 assignments
See how employees at top companies are mastering in-demand skills

Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate

There are 20 modules in this course
This module provides an overview of the course structure, key objectives, and essential tools needed to learn Python. Learners will gain clarity on the skills they will develop and the overall learning journey. It sets the foundation for effective course engagement.
What's included
1 video1 reading
1 video•Total 2 minutes
- Promo Video•2 minutes
1 reading•Total 10 minutes
- Introduction to the Course 'Python Foundations: From Setup to Data Structures'•10 minutes
This module guides learners through the foundational setup of Python programming on both macOS and Windows, covering installation of Python, Visual Studio Code, and essential development tools. It also introduces key concepts like the Python REPL and basic command-line usage. By the end, learners will be equipped to start coding confidently in a properly configured environment.
What's included
15 videos1 assignment
15 videos•Total 129 minutes
- Welcome to the Python Programming Language•12 minutes
- Download Course Files•4 minutes
- macOS - Use the Terminal to Issue Commands to Your Operating System•10 minutes
- macOS - Download and Install Python 3•9 minutes
- macOS - Download and Install Visual Studio Code•2 minutes
- Windows - Use the Command Prompt to Issue Commands to Your Operating System•10 minutes
- Windows - Download and Install Python 3•7 minutes
- Windows - Download and Install Visual Studio Code•3 minutes
- macOS + Windows - Installing VSCode Plugins•6 minutes
- macOS + Windows - Configuring VSCode Project Settings•13 minutes
- macOS - Run Python File•9 minutes
- Windows - Run Python File•10 minutes
- The Visual Studio Code (VSCode) Interface and Helpful Shortcuts•13 minutes
- The Interactive Prompt (REPL)•8 minutes
- OPTIONAL: Words of Motivation•13 minutes
1 assignment•Total 16 minutes
- Getting Started with Python and VS Code•16 minutes
This module introduces foundational Python concepts including string manipulation, function definitions, and the use of the print function with various arguments and parameters. Learners will also explore coding practices such as adding comments and using documentation strings for clarity.
What's included
7 videos1 assignment
7 videos•Total 63 minutes
- Objects: Strings•13 minutes
- Intro to Functions•6 minutes
- The print Function I: Outputting a Single Argument•8 minutes
- The print Function II: Outputting Multiple Arguments•6 minutes
- The print Function III: Parameters and Arguments•18 minutes
- Comments•7 minutes
- Coding Exercise SOLUTION: Outputting Text with the print Function•5 minutes
1 assignment•Total 16 minutes
- Fundamentals of Strings and Print in Python•16 minutes
This module covers fundamental Python data types, including numbers, booleans, and strings, along with essential operations such as arithmetic, comparison, and type conversion. Learners will gain practical skills in writing and evaluating logical expressions and using Python's built-in functions effectively.
What's included
6 videos1 assignment
6 videos•Total 55 minutes
- Mathematical Expressions•11 minutes
- Division, Floor Division, and the Modulo Operator•7 minutes
- The Boolean Data Type, The Equality Operator (==) and Inequality Operator (!=)•15 minutes
- Boolean Mathematical Operators•5 minutes
- The type Function•9 minutes
- Type Conversion with the int, float, and str Functions•9 minutes
1 assignment•Total 16 minutes
- Fundamentals of Python Data Types and Operators•16 minutes
This module introduces learners to the fundamentals of variables in Python, including declaration, assignment, input handling, and common error types. It provides practical coding exercises to reinforce understanding and build confidence in writing robust Python code.
What's included
6 videos1 assignment
6 videos•Total 54 minutes
- Intro to Variables•15 minutes
- Coding Exercise SOLUTION: Declaring Variables•4 minutes
- Multiple Variable Assignments•5 minutes
- Augmented Assignment Operator•7 minutes
- Collecting User Input with the input Function•12 minutes
- The NameError, ValueError, TypeError and SyntaxError Exceptions•11 minutes
1 assignment•Total 16 minutes
- Python Variables User Input and Errors•16 minutes
This module covers the fundamentals of functions in Python, including how to define, use, and structure functions for better code organization and reusability. Learners will explore parameters, return values, default arguments, and the None type, as well as bonus topics like function annotations. By the end, students will have the skills to write and manage functions effectively in their programs.
What's included
9 videos1 assignment
9 videos•Total 54 minutes
- Intro to Functions•11 minutes
- Parameters and Arguments•7 minutes
- Positional Arguments and Keyword Arguments•6 minutes
- Declaring Return Values for Functions•3 minutes
- Coding Exercise SOLUTION: The Basics of Functions•5 minutes
- Default Arguments•3 minutes
- Coding Exercise SOLUTION: Default Arguments•7 minutes
- The None Type•4 minutes
- BONUS: Function Annotations•7 minutes
1 assignment•Total 16 minutes
- Fundamentals of Python Functions•16 minutes
This module introduces fundamental string operations in Python, including length, concatenation, immutability, indexing, slicing, escape characters, and substring checks. Learners will gain practical skills in manipulating and working with strings effectively.
What's included
11 videos1 assignment
11 videos•Total 81 minutes
- Length, Concatenation, and Immutability•10 minutes
- Coding Exercise SOLUTION: Length, Concatenation, and Immutability•4 minutes
- String Indexing with Positive Values•9 minutes
- String Indexing with Negative Values•3 minutes
- Coding Exercise SOLUTION: String Indexing•4 minutes
- String Slicing I: Slicing by Range•12 minutes
- String Slicing II: Slicing by Steps•9 minutes
- Coding Exercise SOLUTION: String Slicing•6 minutes
- Escape Characters•10 minutes
- The in and not in Operators for Checking Inclusion of a Substring within a String•6 minutes
- Strings: The Basics Section Review•7 minutes
1 assignment•Total 16 minutes
- Foundational Concepts in Python Strings•16 minutes
This module covers essential string manipulation techniques in Python, including searching, modifying, formatting, and checking string properties. Learners will gain hands-on experience with methods like find, count, replace, and format, as well as understand string immutability and casing transformations.
What's included
11 videos1 assignment
11 videos•Total 67 minutes
- The find and index Methods•10 minutes
- The startswith and endswith Methods•5 minutes
- The count Method to Count Occurrences of Value in a String•3 minutes
- Coding Exercise SOLUTION: The find and count Methods•4 minutes
- The capitalize, title, lower, upper, and swapcase Methods to Change Casing•7 minutes
- Boolean Methods for Strings•8 minutes
- The lstrip, rstrip, and strip Methods•6 minutes
- The replace Method•4 minutes
- Coding Exercise SOLUTION: String Cleanup Methods•3 minutes
- The format Method•13 minutes
- Formatted String Literals (f-strings)•4 minutes
1 assignment•Total 16 minutes
- Essential Python String Methods and Techniques•16 minutes
This module covers essential concepts in control flow, including conditional logic, boolean expressions, and looping structures. Learners will gain proficiency in using if, else, elif, and while statements, as well as understanding how to combine conditions with logical operators. The module also introduces the basics of recursion and how to apply these concepts in practical coding scenarios.
What's included
17 videos1 assignment
17 videos•Total 145 minutes
- REVIEW: The Boolean Data Type, Equality, and Inequality•5 minutes
- The if Statement•9 minutes
- The bool Function (Truthiness and Falsiness)•7 minutes
- Coding Exercise SOLUTION: if Statements•7 minutes
- The else Statement•6 minutes
- The elif Statement•11 minutes
- Coding Exercise SOLUTION: if, else and elif•4 minutes
- Conditional Expressions (Ternary Operator Equivalent)•5 minutes
- Declaring Multiple Conditions with the and Keyword•7 minutes
- Declaring Multiple Conditions with the or Keyword•5 minutes
- Using the not Keyword to Negate an Expression•5 minutes
- Nested if Statements•8 minutes
- Coding Exercise SOLUTION: Multiple Conditions•4 minutes
- Using the while Loop to Iterate While a Condition is True•15 minutes
- A Brief Intro to Recursion I•18 minutes
- A Brief Intro to Recursion II•16 minutes
- Coding Exercise SOLUTION: Recursion•11 minutes
1 assignment•Total 16 minutes
- Understanding Python Logic and Control Flow•16 minutes
This module introduces learners to Python lists, covering their creation, indexing, slicing, and common operations. Through coding exercises and explanations, students will gain hands-on experience with list manipulation and problem-solving.
What's included
8 videos1 assignment
8 videos•Total 52 minutes
- Intro to Lists•9 minutes
- Coding Exercise SOLUTION: Creating Lists•4 minutes
- The in and not in Operators on a List•7 minutes
- Select a List Element by Positive or Negative Index Positions•8 minutes
- Coding Exercise SOLUTION: Indexing into List•6 minutes
- Slice Multiple Elements from a List•9 minutes
- Coding Exercise SOLUTION: Slicing Elements•3 minutes
- Coding Exercise SOLUTION: List Problems•6 minutes
1 assignment•Total 16 minutes
- Fundamentals of Python Lists•16 minutes
This module covers the fundamentals of iterating over lists in Python using for loops, conditional logic, and built-in functions like enumerate, reversed, and range. Learners will gain practical skills in controlling loop behavior with break and continue, and handling command-line arguments effectively.
What's included
11 videos1 assignment
11 videos•Total 95 minutes
- Iteration with the For Loop•14 minutes
- Coding Exercise SOLUTION: List Iteration•7 minutes
- Iteration with Conditional Logic•13 minutes
- Coding Exercise SOLUTION: More List Iteration•9 minutes
- Iterate in Reverse with the reversed Function•8 minutes
- The enumerate Function•10 minutes
- Coding Exercise SOLUTION: The enumerate Function•7 minutes
- The range Function•8 minutes
- The break Keyword•6 minutes
- The continue Keyword•5 minutes
- Command Line Arguments with argv•8 minutes
1 assignment•Total 16 minutes
- Working with Loops and Iterables in Python•16 minutes
This module introduces essential debugging techniques in Visual Studio Code, focusing on navigating code execution, understanding variable scopes, and applying problem-solving strategies to resolve errors in Python programs.
What's included
4 videos1 assignment
4 videos•Total 42 minutes
- Intro to Debugging in VSCode•11 minutes
- Step Over•8 minutes
- Step into and Step Out•7 minutes
- Working Through a Problem•16 minutes
1 assignment•Total 16 minutes
- Python Debugging with VS Code•16 minutes
This module covers the fundamentals of list mutation in Python, including modifying elements, adding and removing items, and reordering lists. Learners will gain hands-on experience with list methods and slicing techniques to manipulate data effectively. The content also includes practical exercises to reinforce key concepts.
What's included
17 videos1 assignment
17 videos•Total 90 minutes
- Assign New Value at Index Position•6 minutes
- Assign New Values to List Slice•6 minutes
- Coding Exercise SOLUTION: Overwriting Elements in a List•5 minutes
- The append Method and Adding Lists with + Operator•5 minutes
- Coding Exercise SOLUTION: Conditionals, Range, Enumerate•10 minutes
- Building a List Up from Another List•12 minutes
- Coding Exercise SOLUTION: Building a List Up•4 minutes
- The extend Method•6 minutes
- The insert Method•4 minutes
- Coding Exercise SOLUTION: Adding Elements to List•5 minutes
- The pop Method•5 minutes
- The del Keyword•3 minutes
- The remove Method•3 minutes
- The clear Method•1 minute
- Coding Exercise SOLUTION: Removing Elements from a List•8 minutes
- The reverse Method•1 minute
- The sort Method•6 minutes
1 assignment•Total 16 minutes
- List Mutation and Manipulation in Python•16 minutes
This module focuses on mastering essential list methods in Python, including counting, indexing, copying, and manipulating strings with split and join. It also covers advanced topics like multidimensional lists, list comprehensions, and the zip function. Learners will gain hands-on experience through coding exercises and solutions, reinforcing their ability to work efficiently with data structures.
What's included
13 videos1 assignment
13 videos•Total 105 minutes
- The count Method•4 minutes
- The index Method•5 minutes
- Coding Exercise SOLUTION: Encrypt Message•14 minutes
- The copy Method•5 minutes
- The split Method on a String•9 minutes
- The join Method on a String•5 minutes
- Coding Exercise SOLUTION: The split and join Methods on Strings•8 minutes
- The zip Function•9 minutes
- Multidimensional Lists•14 minutes
- Coding Exercise SOLUTION: Multidimensional Lists•6 minutes
- List Comprehensions I: The Basics•10 minutes
- List Comprehensions II: Filtering Results•11 minutes
- Coding Exercise SOLUTION: List Comprehension•6 minutes
1 assignment•Total 16 minutes
- Understanding Lists and Iteration in Python•16 minutes
This module covers essential Python built-in functions used for data manipulation, documentation lookup, and code efficiency. Learners will explore functions like map(), filter(), lambda, and others to process and transform data effectively. By the end, learners will be able to use these tools in practical coding scenarios.
What's included
11 videos1 assignment
11 videos•Total 60 minutes
- The help Function•7 minutes
- The map Function•7 minutes
- The filter Function•4 minutes
- Lambda Functions•8 minutes
- Coding Exercise SOLUTION: map, filter and lambda Functions•9 minutes
- The all and any Functions•4 minutes
- The max and min Functions•2 minutes
- The sum Function•1 minute
- Coding Exercise SOLUTION: The sum Function•3 minutes
- The dir Function•7 minutes
- The format Function•8 minutes
1 assignment•Total 16 minutes
- Essential Python Built-in Functions and Data Manipulation•16 minutes
This module explores the fundamentals of tuples in Python, including their creation, comparison with lists, and techniques for unpacking and using them in functions. Learners will gain practical skills in working with immutable data structures and handling variable argument lists.
What's included
8 videos1 assignment
8 videos•Total 61 minutes
- Intro to Tuples•8 minutes
- Coding Exercise SOLUTION: Declare Tuples•3 minutes
- Lists vs. Tuples•9 minutes
- Unpacking a Tuple I: The Basics•9 minutes
- Unpacking a Tuple II: Using * to Destructure Multiple Elements•10 minutes
- Coding Exercise SOLUTION: Unpacking a Tuple•5 minutes
- Variable Number of Function Arguments with *args•12 minutes
- Unpacking Arguments to Functions•5 minutes
1 assignment•Total 16 minutes
- Working with Tuples and Unpacking in Python•16 minutes
This module explores fundamental concepts in Python such as variables, object references, and memory management. Learners will gain an understanding of how Python handles mutable and immutable types, equality checks, and object copying to prevent unintended side effects. The content equips learners with the knowledge to write more efficient and bug-free Python code.
What's included
4 videos1 assignment
4 videos•Total 22 minutes
- Variables, Objects, and Garbage Collection•4 minutes
- Shared References with Immutable and Mutable Types•4 minutes
- Equality vs. Identity•5 minutes
- Shallow and Deep Copies•9 minutes
1 assignment•Total 16 minutes
- Python References Identity and Copying•16 minutes
This module introduces the fundamentals of Python dictionaries, including how to create, access, update, and manipulate them. Learners will explore key operations such as using the get() method, checking for key existence, and working with nested structures. By the end, they will be able to effectively use dictionaries in real-world programming tasks.
What's included
13 videos1 assignment
13 videos•Total 101 minutes
- Intro to Dictionaries•14 minutes
- Coding Exercise SOLUTION: Create a Dictionary•4 minutes
- Access a Dictionary Value by Key or the get Method•8 minutes
- The in and not in Operators on a Dictionary•8 minutes
- Add or Modify Key-Value Pair in Dictionary•16 minutes
- The setdefault Method•4 minutes
- Coding Exercise SOLUTION: Dictionaries from Lists•14 minutes
- The pop Method•8 minutes
- Coding Exercise SOLUTION: Inclusion and Removal•3 minutes
- The clear Method•3 minutes
- The update Method•4 minutes
- The dict Function•3 minutes
- Nested Dictionaries•12 minutes
1 assignment•Total 16 minutes
- Working with Python Dictionaries•16 minutes
This module covers advanced techniques for working with dictionaries in Python, including iteration methods, sorting, nested structures, and comprehensions. Learners will gain the ability to manipulate and process dictionary data efficiently, as well as handle dynamic argument passing using **kwargs. The module includes coding exercises and solutions to reinforce practical skills.
What's included
14 videos1 assignment
14 videos•Total 92 minutes
- Iterate over a Dictionary with a for Loop•9 minutes
- The items Method•6 minutes
- Coding Exercise SOLUTION: The items Method•7 minutes
- The keys and values Methods•7 minutes
- Coding Exercise SOLUTION: The keys and values Methods•3 minutes
- The sorted Function•5 minutes
- Lists of Dictionaries•6 minutes
- Coding Exercise SOLUTION: Nested Data Structures•4 minutes
- Keyword Arguments (**kwargs)•15 minutes
- Unpacking Argument Dictionary•6 minutes
- Coding Exercise SOLUTION: Keyword Arguments•4 minutes
- Dictionary Comprehensions I•9 minutes
- Dictionary Comprehensions II•5 minutes
- Coding Exercise SOLUTION: Dictionary Comprehensions•7 minutes
1 assignment•Total 16 minutes
- Python Dictionary Operations and Techniques•16 minutes
This module provides an in-depth exploration of Python sets, covering their creation, manipulation, and use in data operations. Learners will gain hands-on experience with set methods and understand how sets differ from other data structures. The content emphasizes practical applications and problem-solving with sets.
What's included
11 videos1 reading2 assignments
11 videos•Total 53 minutes
- Intro to Sets•14 minutes
- The set Function•6 minutes
- Coding Exercise SOLUTION: Set Basics•4 minutes
- The add and update Methods•3 minutes
- The remove and discard Methods•3 minutes
- The intersection Method to Identify Common Elements between Sets•4 minutes
- The union Method to Combine Elements from Two Sets•2 minutes
- The difference Method to Identify Unique Elements in One Set•3 minutes
- The symmetric_difference Method to Identify Elements Not in Common Between Two Sets•3 minutes
- The issubset and issuperset Method•6 minutes
- The frozenset Object•4 minutes
1 reading•Total 10 minutes
- Conclusion to the Course 'Python Foundations: From Setup to Data Structures'•10 minutes
2 assignments•Total 92 minutes
- Python Programming Foundations: From Setup to Data Structures Final Assessment•76 minutes
- Working with Python Sets•16 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructor

Offered by
Explore more from Software Development
Why people choose Coursera for their career

Felipe M.

Jennifer J.

Larry W.

Chaitanya A.

Break down barriers to learning with big savings


Start with easy savings for hard-working teams

Frequently asked questions
Yes, you can preview the first video and view the syllabus before you enroll. You must purchase the course to access content not included in the preview.
If you decide to enroll in the course before the session start date, you will have access to all of the lecture videos and readings for the course. You’ll be able to submit assignments once the session starts.
Once you enroll and your session begins, you will have access to all videos and other resources, including reading items and the course discussion forum. You’ll be able to view and submit practice assessments, and complete required graded assignments to earn a grade and a Course Certificate.
If you complete the course successfully, your electronic Course Certificate will be added to your Accomplishments page - from there, you can print your Course Certificate or add it to your LinkedIn profile.
This course is currently available only to learners who have paid or received financial aid, when available.
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.
More questions
Financial aid available,


