Why learn Python? – Website Point

0

Why learn Python? Well, because it’s user-friendly and everywhere and here and popular and powerful and learnable and lucrative and fun. Why not learn Python?

I should probably unpack it a bit. Let’s look at some of the top reasons why you should learn Python.

Python is friendly

Python is a general purpose programming language. You can do almost anything with it (and we’ll see how everything is shortly). But most importantly for someone planning to learn a bit, the Python world is a friendly place.

If you’ve done any programming in the past, you might have come across “pseudocode”: something that looks like a programming language but isn’t really, because its purpose is to show you what a program. Wikipedia articles explaining how to do something quite often present this description in some kind of fake programming language… and this fake programming language often looks a lot like Python!

Consider teaching someone how to load a dishwasher: delicate things don’t fit; make sure you have enough salt; charge it and turn it on. In code terms, it might look like this:

if dishwasher.salt < FULL:
    dishwasher.salt.fill()
for item in crockery:
    if item.dirty:
        if not item.delicate:
            dishwasher.add(item)
dishwasher.turn_on()

It’s programming code, but it’s hopefully relatively readable and understandable, even if you’ve never seen Python code. And there is no {braces} and no (i++; i>5) hieroglyphs.

This is greatly facilitated by the user-friendliness of Python which extends to the Python community as a whole. Stack Overflow has a vibrant community of people asking and answering Python questions and it’s a great place to get help.

The Python language itself is based on a set of principles called the “Zen of Python”, in which are found guiding ideas such as “simple is better than complex” and “readability matters”.

People who think programming should be a test tend to accuse Python of being built for (and by) people who say “shit” instead of swear, and who turn off the water while they brush their teeth. teeth like you’re supposed to — but the last thing you need is to have to pit yourself against someone else’s idea of ​​justice while you’re trying to get things done. So they can just grow well.

Python is everywhere

Python is used, and is popular, in just about every area of ​​technology. Machine learning is the latest hot thing, and almost all of the code you write to work with AI models is written in Python. PyTorch is the dominant machine learning framework.

If you want to work with image templates or other available configurations, Google’s Colab offers thousands of existing templates and code samples, all built with Python and running in the cloud. It’s good for building web apps and websites, with Django and Flask, and building software for the cloud by creating lambda functions and other serverless setups.

Datasette is a tool for journalists and researchers to help them share data in a useful way without needing to be programmers themselves, and it’s written in Python.

A very large part of data processing and data science software is in Python, with the Numpy, Scipy and Matplotlib libraries.

Almost anything related to math and statistics will contain a lot of Python. PyQt and Kivy let you build apps for desktops and phones.

Python is great for working with devices, electronics, and machines. All software written to run the amazing Stuff Made Here creations on YouTube is written in Python.

And Python is great for “glue code” – small scripts to solve particular problems or to do something on your own machine; not big plans, but little things to help you solve a problem – like starting a backup, or figuring out which words fit today’s Wordle puzzle, or splitting your photos to fit in an album. Python is everywhere.

Python is here

Another great reason to learn Python is that it’s here, wherever you are.

If you’re on macOS or Linux, you already have Python. Open a terminal and type python3 and There you go.

If you’re on Windows, then it’s in the Microsoft Store: see Microsoft’s own instructions on how to install Python from the store or web development method.

On an iPhone there’s Pythonista and Pyto, and on Android there’s QPython and Termux.

And to experiment with Python to get a feel for how it works, you don’t need to install anything at all. The folks at Pyodide have built a full version of Python that runs in a web browser with no installation required, and Jupyter also lets you try Python in your browser.

Python is popular

Another good reason to learn Python is that it’s popular. The TIOBE index draws up the popularity of programming languages ​​each month. Python is still at or near the top (and, at the time of writing August 2022, it is at the top), and TIOBE themselves say “It’s hard to find an area of ​​programming in which Python isn’t widely used these days”.

Similarly, the 2022 Stack Overflow Developer Survey has Python tied for the “most searched” programming language, ahead of JavaScript, Go, and platform-specific languages ​​such as Kotlin and Swift.

GitHub’s “State of the Octovere” summary has Python as the second most popular language across all GitHub repositories. This is partly because Python is available on all platforms; that’s partly because it’s useful in almost every field; and that’s partly because it’s quite easy to grasp.

It’s often a useful approach to go with the flow — to use a tool that many other people use. This way you have a vibrant community to help you with any issues, and very often the problem you are having is something someone else has already solved for you.

Python is powerful

Due to being everywhere and being popular, you can do a lot with Python. Almost no problem is beyond Python. Some very low-level or very performance-critical tasks are better in a more complex language, but that’s a lot rarer than you might think.

In particular, even if you plan to build something in a lower-level language later, it’s often good to prototype in Python…and then work to speed up the most performance-critical paths.

Part of Python being everywhere is that it has been and can be adapted to all sorts of tasks, and because of that Python comes with quite a few problem-solving modules as part of its “library standard” – the suite of code that is available to every Python programmer out of the box.

The Python standard library contains many built-in modules to handle the tasks you want to perform, such as running web servers, processing data, managing dates, times, and time zones, managing files, performing cryptographic operations, network management, HTML management, building applications and talking to the operating system.

Beyond that, the Python Package Index contains a third of a million additional packages to deal with nearly every problem imaginable. That’s a lot of power at your fingertips.

Python is learnable

Because Python is popular and interesting, there are also plenty of resources to help you learn Python.

Of course, there are SitePoint’s own programming tutorials, many dedicated to Python, and all the useful community forums.

FreeCodeCamp offers free coding bootcamps dedicated to learning Python, with dozens of exercises to help you get started with the basics, then move on to web programming and databases or scientific computing, and Learn Python has the same thing.

The Python website itself also gives some guidelines for getting started with Python.

There are many places to learn Python.

Python is lucrative

Of course, learning and knowledge are their own reward. But in case you are not a being of pure energy who’s been uploaded to the internet and instead has bills to pay, a career writing Python can pay off pretty well.

At the time of writing, August 2022, Indeed.com had the average base salary for a Python programmer in the United States at $115,965.

And there are plenty of jobs available. Part of the joy of Python being so versatile and usable in so many different areas of technology is that there are always positions available for those with Python skills. Getting paid is good. Python helps.

Python is fun

where else can you say import antigravity?

XKCD #353, “Python”

The image above is from XKCD, at https://xkcd.com/353/. But if you don’t remember the URL, just open your Python prompt and type import antigravity. Really! Try it now!

So, are you ready to get started?

So why learn Python? Why not learn Python? It’s friendly and everywhere and here and popular and powerful and learnable and lucrative and fun. Now that you’re ready to get started, here are some suggestions on where to look first!

If you learn best by being taught, check out FreeCodeCamp Python bootcamps. If you prefer watching videos, then the Introduction to Python course is good for that, and YouTube is a place to look for tutorials and teach both good and not so good.

If you’re looking to build web projects with Python, How to Quickly Start a Django Project and Django Application is a good place to start, then web development with Django will go a long way after that.

If you want to get started with data science and statistics, check out the book Data science: an introduction then the rest of the series. Both of these dive into the detail of tools, skills, and practical approaches.

If you are looking to develop your programming skills in many areas, I recommend this series of books: The Python Apprenticeand its sequel, and its subsequent sequel, which really go into some detail.

And if you learn best by doing…then do it. Choose a small project, a problem that you would like to solve and use Python to solve it. Don’t worry about building something for someone else to see; leave the UI aside for now.

Pick a simple, real problem and solve it. Maybe it’s something that helps solve the morning crossword by finding all the words that match “-th-n”, or a little tool that lists all your photos taken in 2017, or something that tracks the calories you consumed today.

Watch some of the tutorials above to find out how to get started, and Python’s own documentation for more details on everything that comes with Python out of the box: how to request input, or manipulate numbers and strings, read a file or manage dates . Look for answers and read Stack Overflow.

For those who learn by doing, getting their fingers into Python is a great way to go. He forgives mistakes and helps newcomers. Good luck to you.

Share.

Comments are closed.