
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Tim Buchalka and Jean-Paul Roberts present the Python master class, sharing 70+ years of experience and a mission to teach Python quickly and comprehensively, with free updates and videos.
We remaster and re-record the course with larger fonts and updated content to improve learning, offer downloadable slides and a free upgrade, and encourage you to progress through current sections.
Learn to optimize Udemy video playback by selecting 720p or auto to achieve 1080p when possible, overcoming brief blurriness and ensuring crisp, high-quality videos.
Learn to enable hand-edited English subtitles in this Python programming masterclass, improving comprehension by switching on English captions and understanding that non-English subtitles are machine generated.
Learners master python support by using the course Q&A to ask specific questions, paste color-coded code, attach images, and leverage search to get timely, actionable help from instructors and peers.
Practice hands-on coding by typing along with the videos and running code. Download the source code for comparison, fix errors, and rewatch to deepen understanding.
Explore how an integrated development environment, or IDE, like IntelliJ IDEA, streamlines writing, editing, compiling, and running Python programs, with built-in error checks and one-place tooling.
Download Python 3.10.7 64-bit for Windows from python.org, install, ensure add Python 3.9 to PATH is checked, and verify with python --version.
Install and configure IntelliJ IDEA on Windows to write, compile, and run programs while catching errors early. The guide covers downloading the Windows executable, creating shortcuts, and enabling file associations.
Download the latest macOS version of Python from python.org, run the installer, agree to the license, enter your password, install certificates, and move the installer to trash.
Download and install IntelliJ IDEA on macOS, selecting the correct Apple Silicon or Intel version, installing via DMG to the applications folder, and accepting terms for first run.
Install python 3 on Ubuntu 22.04 via terminal, verify with python3 --version, update with sudo apt update, install python3 and python3-pip, and learn how pip extends Python.
Install and start IntelliJ IDEA Community Edition on Ubuntu using snap or tar, then configure it to write, compile, and run programs while catching errors.
Configure IntelliJ IDEA for Python by installing the Python plugin and linking the Python SDK, then create a new project with a virtual environment to run Python code.
Explore how to customize IntelliJ IDEA or PyCharm for Python development by adjusting appearance, editor options, and code folding, including themes, indent guides, method separators, and newline handling.
Discover what Python is and why to learn it, and get ready to write your first Python program in the next video.
Create your first Python program by writing a Hello World print statement, saving it as helloworld.py, and running it to see the output Hello World in the run window.
Learn how to use the Python print function to output strings and calculations, understand string literals and arguments, and run programs in an IDE like IntelliJ.
Explore strings in Python by using single or double quotes and concatenating with plus. Learn to read input, store it in a variable, and print greetings.
Learn how to use the backslash to escape characters in Python strings, creating newlines with \n and tabs with \t, and manage quotes with single, double, and triple quotes.
Explore three ways to delimit strings in python, and learn to handle backslashes by escaping them or using raw strings, with examples like C:\Users\timbuchalka\notes.txt.
Explore how Python binds values to variables, using strings and integers, and how dynamic and strongly typed data types like string, int, and float work.
Explore how Python binds variables to values, demonstrates strong typing, and raises type errors when mixing int and string during concatenation, with IDE hints.
Explore Python's numeric data types: int, float, and complex numbers. Learn that ints have no practical size limit, floats have finite precision, and Decimal is not used in this course.
Explore python arithmetic with a=12 and b=3, performing addition, subtraction, multiplication, division, integer division, and modulo. See int and float interplay and basic for loops.
Explore how Python expressions calculate values, from simple arithmetic like a + b to integer division a // b and range-based loops, and how literals and variables form nested expressions.
Master operator precedence and the order of operations in Python. See how multiplication and division run before addition and subtraction, and how parentheses clarify complex expressions.
Learn the Python string data type as a sequence of characters and index into strings with square brackets using 0-based indexing to access individual characters and avoid index errors.
Explore negative indexing in Python strings by accessing characters from the end with -1 and other negative positions, practice with the 'we win' string, and relate negatives to string length.
Learn to extract substrings from Python strings using start, stop, and step values to form slices. See how 0:6 yields Norweg and 3:5 yields we, with default start or stop.
Master negative indices to perform advanced string slicing in Python, using start, stop, and step values on the parrot string, with practical examples to reproduce slices.
Master step slicing in Python to extract every n-th character from strings, using start:stop:step syntax; explore practical examples of separators to split a data string into values.
Learn how negative steps reverse Python strings with slice syntax, using start, stop, and -1, including the [::-1] idiom and common pitfalls.
Master Python string slicing by extracting letters such as qpo and edbca with start, stop, and step, and learn idioms like reversing with ::-1 and first or last items.
Explore Python string operators by concatenating strings with +, repeating with *, and testing substrings with the in operator. See how operator precedence and parentheses change results in real examples.
Master Python 3 string formatting with replacement fields using the .format() method to display numbers without coercion, and learn field indexing for reusable, readable output.
Explore advanced string formatting in Python: control field width, alignment, and precision for numbers, including squaring and cubing via the exponent operator, and formatting floating-point values with f-specifiers.
Explore modern string formatting with Python 3.6 f-strings, learn to replace concatenation with expressions inside braces, and apply precision formatting for numeric values like pi.
Explore how Python 2 uses the % formatting operator for string interpolation, with examples for integers, floats, strings, and other specifiers like hex, octal, and scientific notation.
Run a simple hello world Python program and complete the current section. Prepare to explore control flow statements and loops that repeat parts of a program in the next section.
Learn how Python uses indentation to create code blocks, how a colon starts a new block for loops with range, and how IDEs show indentation guides to manage block structure.
Master the use of if statements to control program flow by reading user input, converting to int, and branching on age with else, using replacement fields for prompts.
Master Python conditional logic using elif for multiple condition checks. Learn how age-based tests and else blocks drive different outputs in Python programs.
Explore how the debugger in IntelliJ and PyCharm helps you understand Python code by setting breakpoints, stepping through, and evaluating expressions while inspecting variables.
Build a simple Python guessing game that uses input, converts to int, and tests with if, elif, and else to tell players higher, lower, or you got it.
Explore step-by-step debugging of a guessing game using if, elif, and else, testing conditions, and observing outputs like 'Please guess higher' and 'You've got it first time'.
Add a second guess input and use if and else to determine if the guess is correct, too low, or too high in the Python guessing game.
Master conditional operators in Python, including less than, greater than, equal to, and not equal to, using if/elif/else blocks, indentation, and explicit equality checks (==).
Rewrite the Python guessing game to test for a correct guess first using if guess == answer, then adjust the else accordingly.
Explore how to build complex conditions in Python by combining comparisons with and and or, using an age check between 16 and 65 and testing all input paths.
Learn how to simplify chained comparisons in python by using range checks such as 16 <= age <= 65, and by using or and else to handle out-of-range values.
Explore boolean expressions in Python using True and False constants, and, or, not, with real examples of day, temperature, and rain to illustrate precedence and parentheses.
Explore truthy and falsy values in Python, and learn how None, False, and zero, as well as empty sequences and empty strings, evaluate in boolean expressions.
Apply in and not in operators to test string containment in Python, understanding case sensitivity and the casefold approach for efficient string searching, and explore essential string methods for comparisons.
Apply if conditionals in a small Python program that prompts for name and age, checks eligibility for an 18-30 holiday, and prints a welcome or polite refusal.
Build a Python program that reads name and age, converts age to int, and uses an if to welcome ages 18 to 30 with a formatted message.
learn how python for loops iterate over sequences and strings by assigning items to a variable and executing a block for each value, illustrated with the parrot string.
Debug Python for loops with step-by-step execution and variable inspection, using a for char in number loop, isnumeric checks, and constructing a separators string from non-digit characters.
Learn to extract user input values with for loops in Python, using separators and the built-in sum function to total numeric entries.
Understand Python range objects for iterating with start and stop, where the end is not included; adjust the stop to include the final value and format the results.
Explore how to use Python ranges for looping, including default start at zero, inclusive/exclusive stops, and stepping with positive and negative values; test membership with age in range 16,66.
Discover how nested for loops in Python generate times tables by combining an outer loop with an inner loop, printing formatted results and tracking i and j.
Learn how Python for loops use the continue and break statements to control flow, demonstrated with a shopping list and printing non-spam items.
Discover how the break statement exits a Python for loop once the desired item is found, preventing unnecessary iterations. Track the index with found_at and print the result.
Learn how to handle missing items in a Python list using None as an initial placeholder, explore found_at logic, and compare loop and index-based approaches for item lookup.
Explore how while loops control program execution by evaluating a condition before each iteration, using i < 10 to print values and incrementing i until the condition becomes false.
Compare how Python while loops differ from for loops, including initialization and termination, and apply them to tasks like adventure game prompts and file or stream reading.
Break allows exiting a while loop when the user types quit, with casefold to normalize input before testing the condition. The lecture demonstrates break behavior similar to for loops.
Generate random numbers in Python by importing the random module and using random.randint to pick 1 to 10. Use dot notation and a single upper bound variable, with .format.
Modify the guessing game with a while loop to keep prompting for guesses until the correct number is found, initialize guess, handle zero exit, and raise the range to 1000.
Explore binary search: halve the range 1 to 1000 using midpoints like 500 and 250 with integer division. This approach enables efficient binary search for Python and ordered data.
Write a Python program that lets the computer guess a number using a binary chop algorithm, with a low-high range, while loop, and h, l, or c feedback until correct.
Explain how to fix indentation and empty code blocks using the Python pass statement, implement a hi-lo guessing loop with low, high, break, and guess counting.
Test the hi-low game to ensure robustness and correctness, debug the guess range by printing low and high values, and preview augmented assignment in the next video.
Explore augmented assignment in Python as a concise in-place shorthand for binary operations, boosting efficiency and applying to numbers and strings.
Discover how the PEP 8 style guide shapes readable, maintainable Python code by detailing indentation with spaces, line-length limits, naming conventions, and IDE visual guides for enforcing style.
Refactor Python code to align with PEP 8 by renaming variables to split_string, tabbed_string, and another_split_string using your IDE, then test to ensure behavior remains unchanged.
Learn how the else clause extends for loops in Python, executing code only when the loop finishes without a break, demonstrated with a divisibility-by-8 example.
Enhance the high-low game by using an else clause with a while loop in a binary search of low and high, terminating and printing number and guesses when they converge.
Master conditional breakpoints in PyCharm and IntelliJ to stop a Python while loop when low equals high, speeding debugging of a high-low game.
Learn how to use else with a while loop in Python game development to prevent the quit message and ensure normal termination in adventure.py.
Master python blocks and indentation, use if, else, and elif, practice for and while loops, and a menu-driven coding challenge with augmented assignment and pep 8 styling.
Learn to build a Python menu program that prints options 1–5 and exit, uses a while loop with input, and validates choices with in, breaking on 0.
Refactor the menu loop by defining the choice before the loop and moving input placement to avoid duplicate displays on invalid selections.
discover two ways to replace while true with a terminating condition, using not equal to zero, removing break, and adjusting the logic, then test that the program behaves the same.
Explore Python's built-in sequence types—lists, tuples, and range objects—and review how basic sequence operations work across these types. Bookmark the official documentation as you compare strings and other sequences.
Create Python lists with square brackets and list literals, then index and slice to access items. Iterate with a for loop, and note that lists are mutable unlike strings.
Explore immutable Python objects—int, float, bool, str, tuple, frozenset, and bytes—and why their values can't be changed. See how id() reveals object identity and how rebinding occurs when mutating strings.
Explains mutable objects in Python, showing how lists, dictionaries, and sets can change in place without recreation, using a shopping list example.
Learn about list aliasing in Python by binding multiple names to the same list, then modify it via any alias to see changes propagate to all references.
Explore Python sequence operations by applying min, max, len, and count to lists and strings, and compare mutable and immutable sequences with practical examples, including indexing.
Learn how mutable sequence types work in python, and use the append method to add items to a list with dot notation, highlighting the difference between functions and object-bound methods.
Learn to append items to a Python list using a menu-driven example that builds a computer parts list, tests input, prints updated list, and improves the code to reduce duplication.
Walk through solving a Python mini challenge by adding a new menu option (6 for hdmi cable), testing the selection, and demonstrating how lists improve code maintainability.
Convert a menu into a Python list and print options with a for loop, adding numbered indices via string formatting. Explore efficient list iteration and automatic updates when items change.
Master Python's enumerate to get index positions and items, replacing index lookups with a for loop that uses two variables. Apply it to any iterable, including strings, for efficient indexing.
Learn to refactor a Python buy_computer program by generating a dynamic menu with a list comprehension, replacing long if/elif blocks with simple indexing from available_parts, boosting maintainability.
Learn to manipulate lists by removing items with the remove method after checking membership, and to add items in the else block, with the list printed to show updates.
Explore Python list sorting with the sort method, perform in-place rearrangement using reverse when needed, and extend lists with another list, highlighting mutability and memory implications.
Explore Python's built-in functions, including min, max, print, str, sum, any, and sorted, with practical examples from the course and real-code usage.
Master the sorted() function to sort any iterable, producing a new list, and contrast it with list.sort() which sorts in place; learn about literals and avoiding rebinding built-ins.
Learn how to perform case-insensitive sorting in Python by using the key argument with str.casefold in sort and sorted, and apply it to lists of names.
Create and manipulate lists in Python by using list literals, concatenation, and the list function; copy, sort, and test lists for equality or identity.
Master replacing list items with indexing and slicing in mutable sequences, and learn how slice assignment differs from single-item updates and from replacing a slice with an iterable.
Delete a slice of a Python list and remove outliers. Be careful when deleting during iteration; use safe indexing.
learn to safely remove values from a sorted list when memory is limited, by trimming low values from the start using a stop index with min_valid, then deleting the slice.
Process high values in a Python list by iterating from the end to identify the first item to delete, then remove the tail via a slice.
Explore testing practices that cover edge cases and corner cases, verify behavior with very large and very small values, and test division of numbers.
Practice thorough Python code testing by validating list operations and outlier handling, including removing start and end items, handling empty lists, and considering standard deviation-based thresholds.
Master reverse iteration in Python to remove list items from the end, using two methods and compact code that safely handles outliers and edge cases.
Learn to reverse-iterate a sequence in Python using reversed() and enumerate. Index mapping uses len(data) minus 1, enabling zero-based reverse indices and efficiency on large lists.
Compare deletion strategies in Python as list sizes grow, from a two-loop approach to reversed iteration and enumerate, using timeit to gauge performance and illustrate why one method dominates.
Review the key concepts and techniques covered about Python lists, and preview nested lists and code style in the next video.
Explore nested lists in Python, learn how to structure and access inner lists with for loops, and apply PEP 8 styling, including trailing commas and multi-line list formatting.
Explore how to process nested lists by filtering meals without spam, printing meals and items, counting spam with the count method, and formatting results using dot format.
This lecture shows two Python solutions for removing 'spam' from nested lists. The first mutates inner lists using backwards deletion; the second avoids mutation by filtering items while iterating forwards.
Explore Python function signatures with the print function, learning how parameters like file, sep, and end control output to stdout, including default values and behavior.
Learn to print multiple values with Python's print, using sep and end to control separators and line breaks, and avoid trailing commas with a generator expression.
Master the Python join method to concatenate list items into strings using a separator, see it in action with flowers and meals, and learn why all items must be strings.
Learn how Python's split method divides a string into words using whitespace by default, and how to split on a custom separator, while contrasting split with join and showing examples.
Convert string values to integers in Python by iterating over a list and replacing items in place or building a new integer-valued list with append(int(value)).
Explore Python tuples as immutable sequences, perform operations, and contrast them with lists. Understand when to use parentheses to define or pass tuple literals and when printing yields a tuple.
Explains how tuples work in Python, demonstrating indexing and immutability, contrasts with lists created from tuples, and shows how to convert to a list to modify data.
Explore unpacking tuples and lists in Python, binding multiple variables from a single value or from a sequence, and compare immutable tuples with mutable lists through practical examples.
Explore practical tuple unpacking in Python using enumerate, iterating with indices and values, and unpacking tuples into index and character for clearer, more efficient loops.
Master unpacking tuples in Python by assigning title, artist, and year to variables, show how unpacking enhances readability over index-based access, and explore unpacking within list comprehensions and for loops.
Learn how to build a list of albums by grouping each album into a tuple and storing these tuples in a list, then iterate and print a catalog of albums.
Master Python tuple unpacking with the albums example, unpacking name, artist, and year in a loop for efficient code, and learn about homogeneous tuples.
Explore nesting in Python by examining a list of albums where each item is a tuple containing name, artist, and year, and practice with the tuples_intro.py code.
Explore nested data structures in Python by manipulating a list of album tuples, each with a songs list; index into tuples and lists to print albums, artists, years, and songs.
Master nested indexing in Python's multi-level data structures by accessing albums and their songs, printing specific titles like 'Mayhem' through sequential indices.
Learn to build a Python jukebox interactive menu system that presents albums and tracks, handles selections, exits on invalid input, and demonstrates input validation and program flow.
Learn to import data from separate Python files to share data and code, using from nested_data import albums, and prevent code execution on import.
Explore building a dynamic music menu in Python using a while loop and enumerate to list albums, unpacking tuples into title, artist, year, and songs for display.
Understand constants in Python and the uppercase naming convention, using SONGS_LIST and SONGS_LIST_INDEX to improve code clarity. See how refactoring enforces constant semantics, and why Python doesn't enforce immutability.
Complete the simple Python jukebox by displaying songs from a selected album, prompting for a song choice, and printing the playing title using proper indexing and constants.
Attempt the described challenge from the last video and refine the jukebox navigation to return to the main menu without song selection, with the solution shown in the next video.
Explore the jukebox challenge solution by adjusting Python menu logic to return to the albums list without a song, removing breaks, and refining indentation, then test edge cases.
Master nested lists in Python by applying the second-half takeaways from this section. Prepare for more list techniques in the next section.
Begin a practical overview of Python functions. Build on the functions you've already used and get started with function basics.
Define a Python function with def multiply and return its result, then call it to print 42.0; understand function syntax, parameters, and indentation.
Trace function calls with a debugger, breakpoints, and step over versus step into my code to inspect variables and scope, then verify returns in the console.
Learn to use function parameters and arguments to pass data into a multiply function, replacing hard coded literals and enabling calls and loops to produce varied results.
Master how Python assigns arguments to parameters via call by assignment and positional mapping. Use step-by-step debugging to trace parameter values, scope, and function returns in a multiply example.
Design and implement a Python is_palindrome function using string reversal with slicing and test input cases. Build robust function logic, handle indentation, and explore a case-insensitive palindrome challenge.
Learn how to perform case-insensitive palindrome checks in Python by applying casefold (instead of lower) on both strings, and appreciate how functions propagate fixes to calling code.
Learn to handle punctuation and spaces in palindromes by filtering to alphanumeric characters with the isalnum method, iterating over a sentence, and validating with a palindrome function.
Learn how to call a function from another to reuse code, using is_palindrome as an example. Replace duplicated code with a function call, and apply casefold and return correctly.
Learns to create a get_integer function that validates numeric input using isnumeric, loops until valid, and returns an int to be used in place of a built-in input.
Explore get_integer input validation in Python by analyzing error handling and user messaging for invalid input, and compare using an else block versus omitting the else.
Learn that Python functions always return a value, defaulting to None if you don’t return anything. The lecture demonstrates the return keyword with a multiply function, 18 and 3.
Design a Python banner printer to perform an action without returning a value, using a function to format text with asterisks, center text, and manage width.
Handle invalid arguments in Python by raising a descriptive ValueError when a string exceeds the specified width. Learn to explain the error and prevent unsafe outputs while debugging.
Learn how to add a width parameter to a Python function to boost flexibility, handle missing arguments, and use default values with keyword arguments.
Set a default value of 80 for the screen_width parameter to ensure consistent output when an argument is omitted. See how default parameters and keyword arguments enhance function usability.
Enhance code usability by applying keyword arguments for clarity, adding a default text value, and using screen_width to control banner width.
Learn to read and write docstrings for Python functions by exploring built-in documentation, function signatures, and the role of PEP 257 in documenting code.
Learn to write and use docstrings for Python functions, outline parameters and returns, and choose between restructured text or Google style conventions with IDE support.
Learn to write and view Python docstrings, format names with backticks, and document params and returns using reStructuredText for professional code quality.
Explain fibonacci numbers and sequences by showing the sum of the two previous terms, starting from 0 and 1, and note their appearance in nature through Fibonacci spirals.
Implement a fibonacci function that returns the nth fibonacci number for positive n, returns None for negatives, and tests it with a range loop alongside a concise docstring.
Learn to use function annotations and type hints to clarify parameters and returns, see how they improve readability, and how tools can catch type errors without enforcing at runtime.
Annotate Python function parameters with defaults and adopt proper spacing per PEP 8, illustrated by banner_text with text: str and screen_width: int defaults, and return annotation None.
Explore the historical context of teletype terminals, punch cards, and 80-column outputs. Learn how ANSI escape codes relate to Unix-like systems, DOS, and Windows, and why platform differences matter.
Learn to print colored and styled terminal text in Python by implementing a colour_print function using ANSI escape codes, with reset handling and docstrings.
Navigate the file system, copy the full path, and run Python scripts from a command prompt or terminal to simulate real user environments.
Install colorama via pip in PyCharm or IntelliJ, update pip and setup tools, then import colorama and call init and deinit to enable ANSI across Windows, Linux, and Mac.
Learn to run Python programs inside a dedicated virtual environment by activating the environment with the correct interpreter path and deactivating when finished.
Create a testable HiLo game in Python by adding hilo_test.py, implementing guess_binary, removing user input, and testing all numbers, including edge cases 1 and 1000, for robust debugging.
Learn how a binary search analyzes the HiLo guessing game, counting correct guesses and tracking max guesses, and explore how powers of two affect the number of required guesses.
Build an interactive fizz buzz game by reusing your fizz buzz function to start at 1 and alternate turns with the player toward 100, using input and program output.
Develop a complete fizz buzz game in python by building a while loop driven flow with next_number, fizz_buzz function, and player input, then test thoroughly without shortcuts.
Explore how the star operator unpacks sequences with *args, pack and unpack variable numbers of function arguments, and print and iterate over unpacked values in Python.
Learn to enhance the colour_print function by accepting multiple ANSI escape sequences via a star-argument effects parameter, joining them into a single string for combined styling.
Master five parameter kinds and the required order for function definitions, from positional-or-keyword to var-keyword. Learn how var-positional after positional-or-keyword and keyword-only rules keep colour_print unambiguous and avoid dictionary-related errors.
apply a hands-on example to explore Python parameter types, including positional, keyword, *args, and **kwargs, showing how arguments are parsed and the importance of keyword-only parameters.
Master how to define functions with parameters and arguments, manage scope, and test code in a virtual environment, from call to return, with the five parameter types and docstrings.
Explore dictionaries and sets as core Python data structures, learn key/value access, mapping concepts, and how they differ from lists and tuples; create a DictAndSet project to practice.
Explore Python dictionaries as key-value stores, using curly brace literals to store vehicle data, retrieve values via keys or the get method, and understand key sensitivity and errors.
Iterate dictionaries by keys, values, and items, using dot items for efficiency, and learn how Python 3.7+ preserves insertion order.
Add items to a python dictionary by assigning values to keys, verify insertion order, and note version differences from python 3.5 to 3.7.
Update dictionary values by assigning a new value to an existing key, replacing the old one, and note that duplicate keys overwrite earlier values while Python preserves insertion order.
Delete dictionary items with del and pop, and see when to use each. Handle missing keys with a default value and observe return behavior.
Learn to use Python dictionaries for menu-driven programs, checking key existence with in, and compare dictionary versus list usage, including building a buy_computer dict and using f-strings.
Explore building a menu with a dictionary by iterating over available_parts.items to print keys and values, and compare sorting lists versus dictionaries for the upcoming dict_list.py challenge.
Master dictionary-based menu logic in Python by creating an empty dictionary, adding or removing items with pop, and printing the dictionary to verify updates.
Explore building a smart pantry with Python dictionaries, using keys for items and values for quantities, and map meals to ingredient lists for recipes and sort meals alphabetically.
Transform the meal planner's recipes dictionary into a user menu by enumerating keys, building a display_dict, and using user input to select a recipe.
Combine Python dictionaries to build a dynamic menu and validate user input. Retrieve ingredients from a recipes dictionary using a display_dict of recipe keys to access nested data.
Iterate through recipe ingredients and validate each against a pantry dictionary, printing ok or missing, and note that quantity checks will be added in future videos.
Compare dictionaries and tuples for storing ingredient quantities in Python recipes. Learn how to unpack items and update pantry quantities using these data structures.
Learn to manage inventory by checking ingredient quantities with dictionary get, iterating over ingredients, computing shortages, and organizing required purchases in an iterable data structure.
Explore building a dynamic shopping list for a meal planner, weighing dictionary versus list of tuples, and define add_shopping_item to see how data structure choices affect workflow.
Learn how to refactor a shopping list program by moving from a list of tuples to a dictionary, and improve item lookup and quantity updates after experimenting with sorting.
Discover how to update dictionaries concisely with Python's setdefault. See how setdefault adds missing keys with a default, returns the value, and differs from get.
Explore how external APIs enable syncing data between a Python app and a mobile device. Demonstrate authentication cautions, oauth 2.0 basics, and the difference between official and unofficial APIs.
Explore how Python dictionaries operate as a mapping type, detailing hashable keys, immutability requirements, and essential operations from construction to methods like clear, copy, and pop.
Explore dict.fromkeys for creating initial dictionaries, keys as a Python 3 view, and the upcoming update and values methods, plus readability and set-operation notes.
Discover how the update method merges dictionaries by replacing existing keys, preserving insertion order, and adding new keys at the end, using dictionaries or iterables of key-value pairs.
Explore the dict_values view from the values method and its dynamic updates with dictionary changes. Contrast using value checks and key-based iteration for lookups and understand why index is unavailable.
Discover how shallow copies of dictionaries share mutable values like lists, so changes appear across copies. Use the copy method to create independent dictionaries and distinguish shallow from deep copies.
Demonstrate how shallow copying in Python dictionaries copies references to lists, causing shared mutations; compare with manual copying to create independent lists, and reveal how changes propagate across dictionary references.
Explore how a shallow copy of a Python dictionary with list values copies keys and references, showing that mutable lists remain shared, and how deep copying creates independent objects.
Explore deep versus shallow copies in Python dictionaries and mutable values, use the copy module and deepcopy, and implement a simple one-level function to copy dictionaries and lists.
Implement a custom dictionary deep copy by iterating items, copying list or dictionary values, and returning the new dictionary, then compare it to copy.deepcopy and recursion concepts.
Explore how hash functions produce fixed-size hash values and why Python dictionary keys must be hashable to enable fast lookups in a hash table, noting collisions.
Learn how to implement a simple hashing function in Python using ord and modulo 10 to map keys to 0–9, compare with Python's built-in hash, and discuss hash table basics.
Implement a basic Python dictionary from scratch using a hash table, with separate keys and values lists, hashing keys to index storage and retrieval.
Demonstrates how a dictionary uses a hash table to retrieve values by hashing keys and indexing into a list, returning none for missing keys.
Explore how hash functions enhance security, showing why passwords should never be stored in plain text, how hashes enable one-way verification, and how to detect tampering.
Learn to use Python's hashlib to create and compare sha256 hashes, understand digests, and check file integrity by hashing data. See how algorithms_guaranteed and algorithms_available affect available hash choices.
Learn how Python sets provide unordered collections of unique items, use membership tests with in, and perform union, intersection, difference, and symmetric_difference to solve common programming tasks.
Create sets in Python using set literals with curly braces, and learn that sets are unordered and can be iterated, while only hashable items are allowed.
Sets are unordered and cannot be indexed or sliced. Python equates sets by their items, not their order, illustrating why and when to use sets to fix bugs.
Learn efficient membership testing with Python sets for validating menu input. Use set functions and set literals to compare with lists for performance.
Explore why membership tests are faster with sets than lists by using hash codes and direct access, and learn when to use sets and how set creation affects performance.
Learn to modify sets in Python with the add() method and a loop to collect four unique values, ignoring duplicates; avoid empty set literals, use set() instead.
Use a set in Python to remove duplicates from a list and reveal unique colours, then use dict.fromkeys to preserve first-seen order or sorted to produce an alphabetical list.
Learn Python set methods such as clear, remove, and discard; understand that sets are unordered and how remove and discard differ in behavior, illustrated with packing lists and medications.
Learn how to safely remove restricted items from a Python packing list using the discard method, compare it to remove, and understand set ordering when traveling by plane.
Explore how the set remove method differs from discard by replacing Warfarin with Edoxaban in a patient-trial dataset, showing how remove raises an exception for missing items, unlike discard.
Master the Python set pop method, which removes and returns an arbitrary item from a set with no ordering, allowing you to process each item exactly once.
Explore how to create the union of two or more Python sets using the union method or the pipe operator, illustrated with farm_animals and wild_animals and the set_union.py example.
Explore a practical Python application of set union by generating an alphabetical list of adverse drug interactions from multiple sets and checking Carbimazole quickly.
Use the update method to modify a set in place, avoiding new set creation; contrast this with union that returns a new set, and remember frozen sets are immutable.
Explore why set methods outperform operators by accepting any iterable, and learn to update sets with multiple items using unpacking, then print results with a newline using sep.
Learn to compute set intersections in Python using the intersection method with iterables, comparing readability to operators, and explore primes, squares, and clinical trials examples.
Apply set intersection in Python to identify patients in multiple trials using trial_patients.py. Show how to create sets, compute their intersection, and verify common elements across trials.
Master set difference in Python by comparing odds and primes to get elements in one set but not the other using both the difference method and the operator.
Apply set difference and difference_update to remove restricted items from a packing list, replacing loops with efficient set operations; learn discard, symmetric difference, and passing iterable.
Discover Python's symmetric difference, a set operation yielding items in exactly one of two sets, shown via a programming courses example and implemented with ^ or the symmetric_difference method.
Explore how sets relate in Python by examining subsets, supersets, and proper subsets, and learn how to test them in Python.
Master Python set relationships by checking subset and superset with issubset, issuperset, and the <= and >= operators. Explore isdisjoint and use animals and birds to illustrate subset and supersets.
Learn how to use Python sets to select job candidates by checking superset and proper superset relationships against a required skills set.
Master Python input and output fundamentals, from keyboard input to text files. Learn how the file pointer tracks position and treat text files like lists when reading or writing data.
Discover how files and directories store data across Windows, Mac OS, and Linux, including drive letters, file paths, extensions, and hidden items, with hands-on Python project folders.
Navigate a Windows command prompt or Unix terminal to manage files, switch drives, and list directories with dir or ls, using cd to move and identify files vs directories.
Explore absolute vs relative file paths, using prompts and pwd to locate the current directory across Windows, Mac, and Linux, with backslashes, slashes, dot dot, and case sensitivity.
Explore why text files are human readable, how to read and edit plain text in editors, and how Python uses formats like JSON, CSV, HTML, and pickle.
Learn to read text files in Python by opening Jabberwocky.txt and printing lines. Use the with statement for safe closing and strip or rstrip to handle newlines.
Discover how Python's with statement simplifies file handling by automatically closing files, preventing resource leaks and running out of file handles, and keeping your I/O robust.
Explore Python's with statement for safe file handling and compare read, readlines, and readline for reading text, including memory considerations and simple line processing.
Master the strip, lstrip, and rstrip methods in Python, understanding that they remove end characters, not substrings, affecting spaces and punctuation in text.
Explore Python 3.9+ removeprefix and removesuffix to strip prefixes and suffixes, using startswith/endswith, and learn a generic alternative via slicing for older versions.
Learn how to parse text data from a text file in Python by reading lines, splitting fields with a pipe separator, handling missing data, and converting rows into dictionaries.
Parse the country_info file, unpack seven fields per line, and build a dictionary of dictionaries keyed by country name to look up data by name or ISO code.
Learn to retrieve a country's capital from a nested data structure by applying casefold to input, validating keys, retrieving the capital, looping for repeated queries, and handling invalid input gracefully.
Learn to enhance data retrieval by giving a dictionary two keys per entry—country name and country code—pointing to the same country data, enabling code- or name-based lookups and capital queries.
Learn to write text data in Python by opening, writing, and closing files; append data, use print with a file argument, then read and strip newlines.
Learn to store text with the write method and see how it writes exactly. Compare print and write, noting string representations and the need for explicit newlines.
Master Python file modes r, w, x, a, and r+ by inspecting the open function and how default text mode governs reading, writing, and appending in text files.
Explore the evolution from ASCII and EBCDIC to Unicode and UTF-8, and learn why encoding choices matter for reading files and supporting global languages.
Explore how Python 3 treats unicode by default and how to reliably read and write text by explicitly specifying encodings when opening files, such as utf-8.
Identify and handle text encodings in python by inspecting file encoding, experimenting with utf-8, utf-8-sig, and windows-1252, and diagnosing decode errors from mismatched encodings, including bom considerations.
Learn how Python data structures become JSON for storage or transmission using the json module, encoding with UTF-8 and decoding via dump and load.
Explore how JSON serialization in Python handles data types, why tuples become lists, and the seven JSON types, with dates and complex numbers requiring special handling.
Read real-world json data from a local file, parse with Python's json module, and extract annual temperature anomaly values from 1880 to 2020.
Download json data from the internet with Python using urllib.request and urlopen, decode utf-8, and parse with json.loads, illustrating streams and url input like file I/O.
Explore the CSV file format's structure, uses, and lack of a universal standard, including delimiter choices and quoted fields. Learn how Python's CSV module enables reading and writing CSV data.
Learn to read and parse csv data with Python's csv module, handle newline translation, skip headers, and convert numeric fields, including using dictionaries for column headings.
Parse csv data with Python's csv module by quoting strings and converting numbers to ints or floats. Explore QUOTE_NONNUMERIC and dialect options for handling quoted and unquoted data.
Learn how the csv module's sniffer detects delimiters and dialects to parse data automatically. Use a sample to build and apply a dialect, and optimize by reading few lines and seeking back.
Explore the csv dialect object that groups delimiter, escapechar, and quotechar for the reader, and use getattr and repr to inspect lineterminator and skipinitialspace values.
Learn to write CSV files in Python using the CSV module by converting a list of lists into rows with writerows, including optional column headings and quoting non-numeric values.
Learn to parse csv data into dictionaries using Python's csv.DictReader, iterating to get rows as dictionaries with column names as keys and applying format options and dialects.
Learn to build a dictionary of dictionaries for country data using DictReader to convert CSV rows, handle encoding and delimiter effects, and ensure consistent key case.
Learn to control csv parsing with custom fieldnames and dialects using Python's DictReader and DictWriter, including creating and modifying a dialect and handling lowercase keys.
Learn how to use csv.DictReader and csv.DictWriter to read and write Olympic medals data, transform rows into dictionaries, and open multiple files with a with block.
Write csv data from dictionaries using csv.DictWriter by fieldnames and headers. Handle missing keys with extrasaction, exclude columns, and choose between row-by-row writing or writerows, sorting with a key function.
Transform data with python by using the zip function to combine iterables into key/value pairs, convert them to dictionaries, and write to a CSV file with the DictWriter.
Explore how Python handles text file I/O with a file pointer, seek operations, and the limits of random access; learn practical tips for tab-separated CSV handling and in-memory processing.
Implement invoice number parsing and generation in Python using parse_invoice_number and next_invoice_number. Build tests with unittest and doctest to verify year-based increments and zero-padded formatting.
Implement the record_invoice function to append an invoice to a CSV by reading the last line, generating the next invoice number, and starting at 1 when the file is empty.
Learn to read and write files efficiently with r+ mode, and master file pointers using seek and tell to reliably append invoices without resetting numbering.
Explore how to manage a file pointer in Python by using seek and tell to reset reading positions, and improve a record_invoice function with last_line_ptr to avoid redundant seeks.
Update the docstring and add the last_line_ptr parameter to record_invoice, enabling faster access by seeking to the last line. Learn how tell and seek position the UTF-8 file.
Explore bytes and bytearray in Python, how bytes-like objects store values 0–255, and how binary data decodes to text with UTF-8.
Learn to read and invert a bitmap image by handling binary data in Python, checking the BM header and writing the inverted bitmap.
Explore big endian and little endian byte order, learn how multi-byte numbers are stored, and understand why different architectures and network order affect data interpretation.
Decode binary data by parsing a bitmap file header and DIB information in little-endian format, extracting offsets and pixel data for practical Python file processing.
Learn how to read ID3 tags from MP3 files, extract metadata such as artist, album, and song title, and handle binary decoding and frame types in Python.
Explore the ID3v2.3.0 header and frames, including text information frames and APIC, to understand reading and writing mp3 metadata from binary data.
Learn to decode ID3 v2 tags in Python by handling seven-bit sizes, parsing headers and frames, and processing text, user defined link, and APIC picture frames.
Implement python code to read and decode mp3 id3 tags, focusing on id3v2.3.0 and extended headers. Parse frame headers, text frames, and user-defined url frames, extracting descriptions and urls.
Extract images from id3 apic frames by decoding mime types and descriptions, calculating image data size, and saving files with proper extensions and descriptive names using os.path.
Master step-by-step testing of the read_id3 program in Python, decoding ID3 frames like TIT2, TPE1, TALB, TRCK, TCON, WXXX, and APIC while verifying encoding and binary reads.
Learn to verify file integrity by computing a sha-256 hash with Python's hashlib, read the binary file, and compare it to the published colorama hash from PyPI.
Learn how to use Python modules and functions, importing from standard and own modules, manage scope and namespaces, and handle command line arguments; explore time handling with datetime and pytz.
Explore turtle graphics to draw squares and expanding patterns by importing the turtle and math modules, using loops to rotate shapes, and applying radians and cosine to encircle a square.
Master targeted imports in Python by pulling specific functions from modules, exploring namespaces and scope, and using turtle graphics to draw patterns with radians and cos.
Explore how Python namespaces map names to objects and how global module scope differs from local scope, using dir to inspect module and function namespaces and imported names.
Explore how Python creates new scope through modules, functions, and classes, and inspect local namespaces with dir and locals to distinguish global and function-level variables.
Explore how Python resolves names through local, global, and builtins namespaces, and access built-in functions via the builtins namespace using LEGB rules.
Explore nested functions and their enclosing scope in Python, showing how inner functions access outer variables from the local namespace of greet_pythons and the global namespace, demonstrated through make_greeting.
Explore how Python resolves names across builtins, global, local, and enclosing scopes using LEGB. Learn how nested functions access outer variables and the role of free variables and performance.
Explore how Python optimizes name lookup by promoting free variables to the local namespace, how LEGB scoping works, and why you cannot rebind a free variable in an inner function.
Explore how free variables bind across inner and outer scopes in Python, why global vars can't be free, and how nonlocal binding differs from inner rebinds.
Demonstrate how namespace dictionaries reveal free variables and bindings between inner and outer functions, showing how reassignment changes the binding and how for loops create new local names.
Use the nonlocal keyword to rebind a variable in an outer scope, while avoiding changes to the outer scope to prevent hard-to-diagnose bugs in Python code.
Explore how the global keyword lets inner scopes modify outer variables, and why avoiding this habit improves code. Learn to return values from functions to remove globals.
Explore import mechanisms in Python, comparing import x and from x import y, and see how imports execute module code, affect the global namespace, and impact memory usage and readability.
Understand why copying the globals dictionary in importing.py prevents the 'dictionary size changed during iteration' error, as for loops add new namespace names.
Explore the risks and limited uses of import *, including namespace pollution and name clashes, with a turtle module demo illustrating why you should generally avoid it.
Learn to prevent code execution on import by using the __name__ == '__main__' check and inspecting the dunder name.
Discover how binding local names to functions speeds local namespace lookups in Python, but use as a last resort; prioritize algorithm improvements and heavy-loop optimizations.
Learn to launch web pages with Python's webbrowser module by opening URLs in the default browser, using open, open_new, and open_new_tab, and understand platform-independent behavior.
Master handling dates and times in Python using the datetime module, time zones, UTC, daylight saving time, and the IANA tz database, with zoneinfo in Python 3.9.
Master the date class from the datetime module in Python by creating date objects, accessing year, month, and day, formatting with strftime, and using locale for language-aware day names.
Master how to use Python's timedelta from datetime module to represent day and time differences, normalize units, and perform date arithmetic with addition, subtraction, and the repr of timedelta objects.
Explore Python's time objects, tzinfo, and timezones, and learn when to use datetime instead; parse ISO 8601 strings with fromisoformat and understand UTC and DST concepts.
Explore Python's datetime class to get current date and time, compare now, today, and utcnow, and learn import aliasing and tzinfo for naive and aware times.
Clarify aware versus naive datetime objects in Python and how timezone information changes time meaning. Use IANA timezone names like America/New_York to convert across zones and consider daylight saving time.
Explore how to manage timezones in Python with the zoneinfo module, back-port it for versions earlier than 3.9, and resolve Windows and other OS setup issues using tzdata and pip.
Master timezone handling in Python using zoneinfo to create ZoneInfo objects, convert times with astimezone, view available_timezones, and display current times for Paris, London, Hong Kong, and Nairobi.
Demonstrate two approaches to converting UTC to multiple timezones with zoneinfo and astimezone, then format outputs using strftime or replace to manage microseconds and display tzname.
Explore how daylight saving time affects Python datetime calculations using ZoneInfo for London and New York. Learn to perform arithmetic in UTC to avoid DST-related gaps and ambiguities.
Convert local aware datetimes to UTC before arithmetic, then convert back to the original timezone for display, to avoid daylight saving bugs and ensure consistent results.
Access the latest Python programming content via the remastered course updates in a work-in-progress section. Continue learning with older material until new sections replace it in the main course.
Whether you want to:
- build the skills you need to get your first Python programming job
- move to a more senior software developer position
- get started with Machine Learning, Data Science, Django or other hot areas that Python specialises in
- or just learn Python to be able to create your own Python apps quickly.
…then you need a solid foundation in Python programming. And this course is designed to give you those core skills, fast.
This course is aimed at complete beginners who have never programmed before, as well as existing programmers who want to increase their career options by learning Python.
The fact is, Python is one of the most popular programming languages in the world – Huge companies like Google use it in mission critical applications like Google Search.
And Python is the number one language choice for machine learning, data science and artificial intelligence. To get those high paying jobs you need an expert knowledge of Python, and that’s what you will get from this course.
By the end of the course you’ll be able to apply in confidence for Python programming jobs. And yes, this applies even if you have never programmed before. With the right skills which you will learn in this course, you can become employable and valuable in the eyes of future employers.
Here’s what a few students have told us about the course after going through it.
“I had very limited programming experience before I started this course, so I have really learned a lot from the first few sections. It has taken me from essentially zero programming skill to a level where I'm comfortable using Python to analyze data for my lab reports, and I'm not even halfway done the course yet. There are other courses out there which focus on data analysis, but those courses are usually targeted at people who already know how to program which is why I chose this course instead. “ – Christian DiMaria
“I have been puttering through your Python course . In that time, though, and without finishing it yet I've been able to automate quite a bit at my work. I work in a school system and unifying data from our various student information systems can be incredibly frustrating, time consuming, and at times challenging. Using your course, I've learned enough to write applications that turn massive text files into dictionaries that get "stitched" together like a database and output to properly formatted CSV files and then uploaded via SFTP to various systems for secure processing. Our teachers, students, and the tech department have greatly benefitted from this automation. I just wanted to drop you a note thanking you for helping me learn this skill.” – Keith Medlin
“This course was great. Within 3 weeks I was able to write my own database related applications.” – Theo Coenen
And there are many more students who love the course – check out all the reviews for yourself.
Will this course give you core python skills?
Yes it will. There are a range of exciting opportunities for Python developers. All of them require a solid understanding of Python, and that’s what you will learn in this course.
Will the course teach me data science, machine learning and artificial intelligence?
No, it won’t do that – All of these topics are branches of Python programming. And all of them require a solid understanding of the Python language.
Nearly all courses on these topics assume that you understand Python, and without it you will quickly become lost and confused.
This course will give you that core, solid understanding of the Python programming language.
By the end of the course you will be ready to apply for Python programming positions as well as move on to specific areas of Python, as listed above.
Why should you take this course?
There are a lot of Python courses on Udemy – Your instructors, Tim and Jean-Paul are pretty unique in that between them they have around 70 years of professional programming experience. That’s more than a lifetime of skills you get to learn Python from.
You can enrol in the course safe in the knowledge that they are not just teachers, but professional programmers with real commercial programming experience, having worked with big companies like IBM, Mitsubishi, Fujitsu and Saab in the past.
As such you will not only be learning Python, but you will be learning industry best practices for Python programming that real employers demand.
And if that’s not enough take a read of some of the many reviews from happy students – there are around 100,000 students who have left around 19,000 reviews.
This is one of the most popular courses on Python programming on Udemy.
Here’s just some of what you’ll learn
(It’s okay if you don’t understand all this yet, you will in the course)
· All the essential Python keywords, operators, statements, and expressions needed to fully understand exactly what you’re coding and why - making programming easy to grasp and less frustrating
· You will learn the answers to questions like What is the Python For Loop, what is Python used for, how Python switch the traditional syntax of code, and more.
· Complete chapters on object-oriented programming and many other aspects of Python, including tKInter (for building GUI Interfaces) and using databases with Python.
· Although this is primarily a Python 3 course, a python developer will need to work with Python 2 projects from time to time – We’ll show the difference in both versions to make sure you understand how things work differently in each version.
· How to develop powerful Python applications using one of the most powerful Integrated Development Environments on the market, IntelliJ IDEA! - Meaning you can code functional programs easier. IntelliJ has both a FREE and PAID version, and you can use either in this course. PyCharm will also work just fine.
(Don’t worry if you want to use another IDE. You’re free to use any IDE and still get the most out of this course).
Does the course get updated?
It’s no secret how technology is advancing at a rapid rate. New, more powerful hardware and software are being released every day, meaning it’s crucial to stay on top with the latest knowledge.
A lot of other courses on Udemy get released once, and never get updated. Learning from an outdated course and/or an outdated version of Python can be counter productive and even worse it could teach you the wrong way to do things.
For example if you apply some parts of Python 2 to Python 3 code, you will get completely different results.
We cover differences like this in the course and also continually update the course as well.
What if you have questions?
As if this course wasn’t complete enough, we offer full support, answering any questions you have 7 days a week (whereas many instructors answer just once per week, or not at all).
This means you’ll never find yourself stuck on one lesson for days on end. With our hand-holding guidance, you’ll progress smoothly through this course without any major roadblocks.
That’s just one reason why Tim was voted top 10 in the Udemy instructor awards (out of a whopping 18,000 instructors), and quickly became a top-rated, bestselling instructor on the Udemy site.
Student Quote: “Tim and JP are excellent teachers and are constantly answering questions and surveying students on new topics they will like to learn. This isn't a Python course it’s THE Python course you need.” – Sean Burger
There’s no risk either!
This course comes with a full 30 day money-back guarantee. Meaning if you are not completely satisfied with the course or your progress, simply let Tim or J-P know and they will refund you 100%, every last penny no questions asked.
You either end up with Python skills, go on to develop great programs and potentially make an awesome career for yourself, or you try the course and simply get all your money back if you don’t like it…
You literally can’t lose.
Ready to get started, developer?
Enrol now using the “Add to Cart” button on the right, and get started on your way to creative, advanced Python brilliance. Or, take this course for a free spin using the preview feature, so you know you’re 100% certain this course is for you.
See you on the inside (hurry, your Python class is waiting!)