Python Examples

Welcome to We provide three different paths to learn Python programming easily at your own pace that matches with your learning style. They are Tutorials, Exercises, and Challenges.

1. Tutorials

This is a huge collection of Python tutorials with well detailed examples and programs. In these tutorials, we cover basics of Python programming, advanced concepts, and most regularly used Python modules.


The following tutorials cover the types of collections in Python language.


Advanced tutorials cover file operations, regular expressions, multi-threading, etc.

2. Exercises

The exercises will help you test your skills on the syntax of Python programming basics. Each exercise has a description of what to do, and a program with input text fields. When you enter your input and click on the Submit button, it checks whether you answered correctly or not.

If you are not aware of the answer, you may click on Show Answer button, and it will display the answer. And you may click on the Reset button to clear the answers, and try again yourself.

Go to Exercises

3. Challenges

The challenges will help you test your problem solving skills using Python programming. Each challenge has a use case with a requirement. The inputs and required outputs for the challenge are defined. A program editor with the boilerplate code is given. You have to complete the code, and Run Tests.

If you are not aware of the solution, you may click on Show Answer button floating on the bottom right corner of the program editor window. You can also reset the code to the boilerplate version, or Download the the program from the current program editor window.

Go to Challenges

Python Online Compiler

When you are going through the tutorials, under example programs, you will find a small button Run Code Online as shown in the following.

When you click on that button, it takes you to a new window with the program in the code block above the button.

On the left side is the program editor window, where you can make changes to the code. When you are done with the code changes, click on the Run button. The buttons before the Run button are the Home, Download, and Reset button from left to right respectively.

The output is displayed in the right side panel under Output.

Go to Python Online Compiler

Other Tutorials

The following references cover tutorials for other scripting or programming languages.

External Resources

Code copied to clipboard successfully 👍