
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn how end and sep keywords control Python's print output, using sep for separators and end to keep text on one line; both must be string values.
Explore how the newline character splits a string in Python by printing a name and is on separate lines.
Distinguish regular division from integer division in Python, using a backslash for regular division and a double backslash for integer division, and see 14 mod 5 equals 4.
Explore Python slicing on lists and strings, using start:end ranges; learn that del removes list elements but can't be used on strings, and see how slicing yields an empty list.
Learn how to apply a for loop to a string in Python by iterating with range(len(name)), indexing characters to build a single output, and using print with end.
Explore how to slice strings, use in and not in operators, note strings are immutable, avoid del, concatenate with +, and recognize append or insert do not apply to strings.
Mastering intermediate Python covers string methods such as capitalize, center, endswith, find, and isalnum, with practical examples on a name variable.
Explore python string methods isalpha, islower, isspace, isupper, lower, and lstrip, and see how they evaluate a name variable for letters, casing, spaces, and leading spaces.
Explore Python string methods by using replace to swap characters, find and rfind to locate positions, and strip to remove trailing spaces, with practical examples.
Master Python string methods such as upper, title, swapcase, strip, startswith, and split. Learn how these methods adjust case, trim spaces, check prefixes, and convert strings into lists.
Learn how the split method converts a string to a list by default when called with empty parentheses. Then see how placing a specific separator inside parentheses yields three elements.
How computers and other devices use encoding such as ASCII to process strings as well as single characters
Outside of ASCII we also have another encoding format called UTF-8
How to use both ord & chr functions to get value represented in encoding
Explore min and max on a string by assigning letters to an alpha variable, locate characters with the index method, convert to a list, and count occurrences.
Learn how to replace verbose Python for loops with list comprehension, using a countries list, range, and upper to generate and print new lists in concise one-line expressions.
Explore functions and scopes in Python with a calculator example showing a local numbers variable printing 123, and explain how a number created outside the function is accessible inside.
Apply the del keyword to remove the element at index zero from a list passed to a function, illustrating how in-place changes to digit affect the outside variable.
Explore modules and packages in Python, essential for large projects, and learn to access standard library content such as functions, methods, variables, and classes, with examples like user and supplier.
How to access a module using the import keyword
Different ways we can access a module and import its properties by using the from, as keywords
In this lesson you'll learn how to access the properties of a module and utilize them
How and why dir() function is used in python
Learn to use Python's platform module to query operating system details, processor names, and Python versions with functions like machine, processor, system, version, and python_version_tuple.
Learn how to python conducts a search for a module, and how you can modify the path variable, so when import instruction is placed inside your code python can directly search for the module you would like to import, and not skip it
Introduction to a package, how to access a package, __init__.py file
Explore how Python raises errors and exceptions when code fails, how handling exceptions resumes program execution, and how to observe, identify, and manage each exception.
Exceptions you might encounter during your programming career in python programming language, their location & their task
Demonstrates practical examples of exceptions in Python, including zero division error when dividing by zero and index error from accessing list index zero, with console tracebacks.
How to handle a raised exception
Mastering intermediate Python explains that exceptions form a tree where the first matching branch may be more general, as zero division is caught by arithmetic error.
We can use 2 except blocks to handle more than one exception if we are not exactly sure what exception to expect from the code
How to incorporate the else block in try & except block
In this lesson you will be introduced to a keyword called finally , and you will learn how to incorporate it along with the try, except block
In this lesson you will learn how to use the 'as' keyword in order to catch an exception as an object to access its properties
You'll learn about the args property which is apart of BaseExveption, and how we can access this specific property
Mastering intermediate Python teaches raising exceptions with the raise keyword, creating a division function, handling zero division errors with try and except, and displaying errors via print.
How can we use the raise instruction without placing exception name next to it
Also how we can distribute the error handing duties
Learn how to use the assert statement in python to validate input data by converting input to float, guarding code, and triggering an assertion error when data fails.
Explore object oriented programming in python, contrasting it with procedural programming, and learn how classes, objects, attributes, and methods unite data and code in real world applications.
You'll learn how to create a class and an object of the same class
Explore the __init__ constructor and the mandatory self parameter inside a class, where the constructor initializes a new instance and runs automatically when an object is created.
Learn to create an instance variable inside a class using self, initialize it in the init method, and access it from an object with the correct dot notation.
It's possible to add an instance variable to a class object at any stage of its existence
How to create a method inside our class
Learn how to access a class variable through an object by binding it with self, using a class variable number with value seven and an instance variable Z.
Apply __dict__ to a Python class and its instance to see how class variables and instance variables appear in the resulting dictionary, clarifying their behavior.
Learn to implement the __str__ method in a Python class to return first and last name with a space, and print an object to display John Doe in the console.
Explore the __name__ attribute and the name property in Python classes, showing how to access a class name with type(obj).__name__, and why the name property exists for classes, not objects.
Learn how to create a private instance variable in Python using double underscores, encapsulation, and why external access triggers an attribute error.
A class demonstrates how a method called get can access a private instance variable and return its value after adding six.
In this lesson I will discuss a term called mangling by which we can easily access properties within our class
Detailed explanation with practical example of how inheritance works in object oriented programming
Explore how a subclass inherits a superclass method and overrides it, using object one from A and object two from B to display results in the console.
Explore inheritance by creating a subclass that overrides a superclass instance variable and initializes it through the superclass constructor, then prints the overridden my lucky number values.
We can also utilize the super() function to access the superclass and modify an instance variable
We are not obliged to use the super() function in order to access the class variable of our superclass
is operator can be used as a comparison operator to check whether objects that are being compared to one another are the same or not
Learn multiple inheritance in programming by creating classes A and B and a subclass C that inherits both, then access data, age, and methods func A and func B.
How python looks for a data in multiply inheritance
Explore the Python __bases__ attribute, a tuple on a class that reveals its superclasses. Learn to print superclass names by iterating bases, and note that bases apply only to classes.
Special function which allows to check whether a class is a sublcass of another close or not
This specific functions allows us to check whether an object is an instance of a particular class
In this lesson we will compare procedural programming to object oriented programming with real practical examples and contrast the two sets of codes between one another
Explore how generators produce a series of values and control iteration in Python, with range as an example, and use the iterator protocol via __iter__ and next, plus StopIteration handling.
Compare list comprehension and generator in Python by highlighting brackets versus parentheses, using for loops to display values, and recognizing generator objects with type and len behavior.
Learn how to create lambda functions in Python, assign them to variables, and invoke them to perform additions, multiplications, divisions, and powers, including multi-parameter and nested lambdas.
Learn how to assign a function to a function parameter and pass an anonymous lambda as an argument within a display function. The numbers function multiplies inputs by five.
Explore using lambda as an anonymous function, passing it to a display function, and invoking it inside a loop or list comprehension with range and print separators.
Explore Python closures by building a function inside another function, returning the inner function, and invoking both to demonstrate stored values.
Explore closures by nesting B inside A, passing a number parameter, multiplying by 3, and printing 15 when both functions are invoked.
How to use the open() function to establish a stream , specially a stream object
We can open a stream in different modes
Practical example of how to successfully stream a file, create a stream object, as well as the streams that are run by python without our knowledge to support the process of a successful coding
Understand how the close() function can fail, catch IO error with a try-except block, and access the errno property from the exception object when closing and reading streams.
We have a module called errno which is identical in name with a property of IOError exception class object. This particular module contains useful constants able to handle plenty stream related errors
By using the read() function we are able to read the contents of our file in string format
demonstrates reading from a text file with the read() function, including two-character reads, printing, counting characters, and handling io errors with errno and optional read variants.
The readlines() method also returns a set of lines however as list data type containing string elements, and unlike the readline() method it accepts an argument specifying the byte capacity we wish to accept
We can apply the for loop on open() function as it returns an object
In this lesson we will learn how to use the write() method to insert few lines of text in our text file
In order to process binary data we need to use bytearray class
In this lesson I'll speak on bytearray class in details, how we can create a binary file, and how we can use the readinto() method to read binary file
Ready to take your Python skills to the next level?
This course is designed for Python learners who already know the basics and want to write more advanced, real-world programs. You’ll gain the skills and confidence to tackle complex projects and think like a professional Python developer.
Through hands-on exercises and practical projects, you’ll master key intermediate topics such as Object-Oriented Programming (OOP), exceptions, generators, closures, lambda functions, modules, file handling, and list comprehensions. By the end of this course, you’ll be able to write efficient, elegant, and maintainable Python code and apply your skills to real-world problems.
Why This Course Is Different :
Focuses on practical, real-world projects rather than theory
Step-by-step guidance to help you level up from beginner to intermediate
Exercises designed to reinforce every concept and skill
Builds confidence in writing Python code for more complex applications
Who This Course Is For:
Learners with some prior experience in Python or programming
Students ready to go beyond the basics and create more advanced programs
Hobbyists or developers who want to write more professional Python code
Anyone aiming to build real-world projects or prepare for technical interviews
What You’ll Learn:
Apply Object-Oriented Programming principles in Python
Handle exceptions and errors like a professional
Work with generators, closures, and lambda functions
Read from and write to files effectively
Use modules and list comprehensions to write cleaner, shorter code
Build intermediate-level projects to practice and solidify skills
Gain confidence in writing efficient and maintainable Python programs
Requirements:
Basic knowledge of Python fundamentals
A computer with Python installed
Motivation to practice and solve real problems
-- Start Leveling Up Your Python Skills--
Enroll now and unlock your potential! Build practical, intermediate-level Python skills and gain the confidence to tackle real-world projects.
.