Python: a friendly, popular, powerful and easy to learn programming language
Why learn Python? Because it is friendly, ubiquitous, popular, powerful, easy to learn, marketable and fun. Why not learn Python?
Let's dive into some of the main reasons for learning Python.
Python is a universal programming language. You can do almost anything with it (we will soon learn about its wide application). But the most important thing for those who think about learning programming is that the Python world is a friendly place.
If you have done some programming in the past, you may have encountered "pseudo-code": it looks like a programming language, but it is not actually because its purpose is to show you the functionality of the program. Wikipedia articles explaining how to do something often elaborate on the description in the form of some simulated programming language…and this simulated programming language is often very similar to Python!
Think about how to explain to someone how to load a dishwasher: Fragile items cannot be put in; make sure there is enough salt; load and turn it on. Indicated by code, it may look like this:
if dishwasher.salt: dishwasher.salt.fill() for item in crockery: if item.dirty: if not item.delicate: dishwasher.add(item) dishwasher.turn_on()
This is programming code, but even if you have never seen any Python code, it is relatively easy to read and understand. And there are no hieroglyphs such as {} brackets and (i; i>5).
Python's friendliness is also reflected in the entire Python community. Stack Overflow has a vibrant community where people ask and answer Python questions, which is a great place to get help.
The Python language itself is based on a set of principles called "Zen of Python" that contain guiding ideas such as "simplicity is better than complex" and "readability is important."
Those who think programming should be a test tend to blame Python for those who say “oops” instead of cursing, and those who turn off the faucet while brushing their teeth (like you should)— —But when you try to accomplish something, the last thing you need is to conform to other people’s view of justice. So they'd better get out of here.
Python is used in almost all technical fields and is very popular. Machine learning is the latest popular technology, and almost all the code used to process AI models is written in Python. PyTorch is the main machine learning framework.
If you are interested in using image models or other available settings, Google's Colab has thousands of existing models and code examples, all built in Python and run in the cloud. It is suitable for building web applications and websites (using Django and Flask), as well as building cloud software by building lambda functions and other serverless settings.
Datasette is a tool for journalists and researchers to help them share data in a useful way without becoming a programmer, and it is also written in Python.
A large part of data processing and data science software is written in Python, including Numpy, Scipy, and Matplotlib libraries.
Almost all aspects related to mathematics and statistics have a lot of Python code. PyQt and Kivy allow you to build applications for desktop and mobile devices.
Python is perfect for handling equipment, electronics and machines. All the software on YouTube for running the amazing Stuff Made Here works is written in Python.
Python is great for "glue code" - small scripts for solving specific problems or performing certain operations on your own machine; not large projects, but small things that help you solve problems - such as starting a backup , or calculate which words are suitable for today's Wordle puzzles, or divide your photos into sections that fit your album. Python is everywhere.
Another good reason to learn Python is that it is right next to you.
If you are using macOS or Linux, you have Python installed. Open the terminal and type python3 and it's there.
If you use Windows, it's in the Microsoft Store: see Microsoft's own instructions on how to install Python from a store or web development method.
On iPhone, there are Pythonista and Pyto, and on Android, there are QPython and Termux.
To experiment with Python to understand how it works, you don't need to install anything. The Pyodide team built a full version of Python that can run in a web browser without any installation, and Jupyter also allows you to try Python in your browser.
Another good reason to learn Python is that it is very popular. The TIOBE index ranks the popularity of programming languages every month. Python always ranks first or near the top (at the time of writing, in August 2022, it did rank first), and TIOBE itself said: "It's hard to find a programming field where Python is not widely used today."
Similarly, the 2022 Stack Overflow Developer Survey shows that Python is tied with the "most popular" programming languages, leading JavaScript, Go and platform-specific languages such as Kotlin and Swift.
GitHub's "Octoverse Status" summary lists Python as the second popular language in all GitHub repositories. Partly because Python is available on all platforms; partly because it is very useful in almost every field; partly because it is easy to master.
Following the trend is often a useful way to do it – using tools that many others are using. This way, when something goes wrong, you have a dynamic community to help, and the problems you may have are usually problems that others have already solved for you.
Since Python is everywhere and very popular, you can do a lot with it. There are almost no problems that Python cannot solve. Some very underlying or very performance-oriented tasks work better in more complex languages, but this is much less than you might think.
In particular, even if you plan to build something in a more underlying language later, it is usually better to prototypify in Python first...and then work hard to speed up the most critical performance path.
Part of the reason why Python is everywhere is that it has been and can be adapted to various tasks, and therefore, Python is bundled in its "standard library" (a suite of code that every Python programmer can use out of the box) Many modules for solving problems are used.
The Python standard library contains many built-in modules for handling tasks you may want to perform—such as running a web server, processing data, processing dates, time and time zones, managing files, performing encryption operations, managing networks, processing HTML , build applications and communicate with the operating system.
In addition, the Python package index has more than 300,000 packages that can handle almost all the problems you can think of. This is a huge power on your fingertips.
Because Python is popular and interesting, there are also many resources to help you learn Python.
Of course, there are SitePoint's own programming tutorials, many of which are specifically for Python, and all the helpful community forums.
FreeCodeCamp has a free coding bootcamp dedicated to learning Python, which contains dozens of exercises that can help you start with the basics and then move to web programming and databases or scientific computing, as does Learn Python.
The Python website itself also provides some guidance on how to get started with Python.
There are many places to learn Python.
Of course, learning and knowledge are rewards in themselves. But if you are not being uploaded to the Internet, but need to pay some bills, then a career in Python programming can be paid quite well.
At the time of writing, in August 2022, Indeed.com showed that the average base salary for Python programmers in the United States was $115,965.
And there are many job opportunities. Python is so versatile and available in many different technical fields that the fun it brings is that there are always job opportunities for Python skilled talents. Getting paid is a good thing. Python can help you achieve it.
Where else can you say import antigravity?
XKCD #353, "Python"
The above picture is from XKCD and the URL is https://xkcd.com/353/. However, if you can't remember its URL, just open your Python prompt and type import antigravity. real! Try it now!
So, why learn Python? Why not learn Python? It is friendly, ubiquitous, popular, powerful, easy to learn, marketable and fun. Now that you're ready to get started, here are some suggestions on what you should check out first!
If you like to learn through teaching, check out the FreeCodeCamp Python bootcamp. If you prefer watching videos, then the Python introductory course is perfect for you, and YouTube is also a place to find excellent and not-so-good tutorials and teaching.
If you want to build a web project using Python, how to quickly start a Django project and Django application is a good starting point, and then web development with Django will be of great help.
If you want to start learning about data science and statistics, check out the book "Data Science: Getting Started" and then the rest of the series. Both books explore in-depth details of tools, skills, and practice methods.
If you want to improve your programming skills in many areas, I recommend this series of books: Python Apprentice and its sequels and follow-ups, which really go into some details.
If you like to learn through practice... then do it. Choose a small project, a problem you want to solve, and use Python to solve it. Now don't worry about building something for others; put the user interface aside for the time being.
Choose a simple, practical problem and solve it. Maybe it can help solve the morning crossword puzzle, find all the words that match "-th-n", or a gadget that lists all the photos you took in 2017, or a tracking your calories intake today tools.
Check out some tutorials above to learn how to get started, and Python’s own documentation for full details of everything Python provides out of the box: how to request input, or manipulate numbers and strings, read files, or process date. Search for answers and read Stack Overflow.
For those who learn through experiments, putting your finger into Python is a great way. It tolerate mistakes and helps newbies. Good luck.
Why should I learn Python? Python is a universal high-level programming language known for its readability and simplicity. It is widely used in the fields of web development, data science, machine learning, artificial intelligence, automation and other fields.
Is Python suitable for beginners? Yes, Python is usually recommended for beginners because it is syntax-clear and readable. It emphasizes code readability and allows developers to express concepts in fewer lines of code than languages such as C or Java.
Does any programming experience be required to learn Python? No, Python's original design is to be beginner-friendly. It's a great language for newcomers to programming, but it's also suitable for more experienced developers.
Is Python used only for web development and data science? No, Python has a wide range of applications. In addition to web development and data science, it is also used in fields such as automation, scripting, game development, and scientific research.
The above is the detailed content of Why Learn Python?. For more information, please follow other related articles on the PHP Chinese website!