w3resource

Python Exercises, Practice, Solution

What is Python language?

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java.

Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library

Python Exercises Practice Solutions

The best way we learn anything is by practice and exercise questions. We have started this section for those (beginner to intermediate) who are familiar with Python.

Hope, these exercises help you to improve your Python coding skills. Currently, following sections are available, we are working hard to add more exercises .... Happy Coding!

You may read our Python tutorial before solving the following exercises.

Latest Articles : Python Interview Questions and Answers     Python PyQt

List of Python Exercises :

Python Basics Python Control Flow Python Data Types Python Class Python Concepts Functional Programming Date and Time File Handling Regular Expressions Data Structures and Algorithms Advanced Python Data Types Concurrency and Threading Python Modules Miscellaneous

Python GUI Tkinter, PyQt

Python Challenges :

Python Projects :

Learn Python packages using Exercises, Practice, Solution and explanation

Python urllib3 :

Python GeoPy Package :

Python BeautifulSoup :

Python Arrow Module :

Python Web Scraping :

Python Natural Language Toolkit :

Python NumPy :

Python Pandas :

Pandas and NumPy Exercises :

Python Machine Learning :

More...

Note : Download Python from https://www.python.org/ftp/python/3.2/ and install in your system to execute the Python programs. You can read our Python Installation on Fedora Linux and Windows 7, if you are unfamiliar to Python installation.
You may accomplish the same task (solution of the exercises) in various ways, therefore the ways described here are not the only ways to do stuff. Rather, it would be great, if this helps you anyway to choose your own methods.

List of Exercises with Solutions :

Popularity of Programming Language
Worldwide, Nov 2023 compared to a year ago:

`
Rank Change Language Share Trend
1 Python 27.99 % +0.0 %
2 Java 15.91 % -0.8%
3 Javascript 9.18 % -0.3%
4 up arrow C/C++ 6.76 % +0.2%
5 down arrow C# 6.67 % -0.3 %
6 PHP 4.86 % -0.3 %
7 R 4.45% +0.4%
8 TypeScript 2.95 % +0.1%
9 up arrow Swift 2.7 % +0.6%
10 down arrow Objective-C 2.32% +0.2%
11 up arrow Rust1.98% +0.3%
12 down arrow Go 1.98% -0.0%
13 down arrow Kotlin 1.76 % -0.1%
14 Matlab 1.6 % +0.0%
15 up arrow Ada 1.02% +0.2%
16 down arrow Ruby 1.0 % -0.1 %
17 up arrow Dart 0.99 % +0.1 %
18 down arrow Powershell 0.93 % +0.0 %
19 down arrow VBA 0.93 % -0.1 %
20 Scala 0.62 % -0.1 %
21 up arrow Lua 0.62 % 0.0 %
22 up arrow Abap 0.58 % +0.1 %
23 down arrow Visual Basic 0.55 % -0.1 %
24 up arrow Julia 0.35 % -0.0 %
25 down arrow Groovy 0.31 % -0.1 %
26 Perl 0.31 % -0.1 %
27 up arrow Haskell 0.27 % -0.0 %
28 down arrow Cobol 0.25 % -0.1 %
29 Delphi/Pascal 0.18 % +0.2 %

Source : https://pypl.github.io/PYPL.html

TIOBE Index for November 2023

Nov 2023 Nov 2022 Change Programming Language Ratings Change
1 1 Python 14.16% -3.02%
2 2 C 11.77% -3.31%
3 4 up arrow C++ 10.36% -0.39%
4 3 down arrow Java 8.35% -3.63%
5 5 C# 7.65% +3.40%
6 7 up arrow JavaScript 3.21% +0.47%
7 10 up arrow PHP 2.30% +0.61%
8 6 down arrow Visual Basic 2.10% -2.01%
9 9 SQL 1.88% +0.07%
10 8 down arrow Assembly language 1.35% -0.83%
11 17 up arrow Scratch 1.31% +0.43%
12 24 up arrow Fortran 1.30% +0.74%
13 11 down arrow Go 1.19% +0.05%
14 15 up arrow MATLAB 1.15% +0.14%
15 28 up arrow Kotlin 1.15% +0.68%
16 14 down arrow Delphi/Object Pascal 1.14% +0.07%
17 18 up arrow Swift 1.04% +0.17%
18 19 up arrow Ruby 0.99% +0.14%
19 12 down arrow R 0.93% -0.20%
20 20 Rust 0.91% +0.16%

Source : https://www.tiobe.com/tiobe-index/

More to Come !

Do not submit any solution of the above exercises at here, if you want to contribute go to the appropriate exercise page.

[ Want to contribute to Python exercises? Send your code (attached with a .zip file) to us at w3resource[at]yahoo[dot]com. Please avoid copyrighted materials.]

Test your Python skills with w3resource's quiz



Follow us on Facebook and Twitter for latest update.