2.4 KiB
title, date, draft, keywords, description, tags, categories, author
title | date | draft | keywords | description | tags | categories | author | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Why Learn Python? | 2018-07-18T20:48:15-04:00 | false |
|
|
|
Dave Gallant |
Python is a high-level, general-purpose language that has a wide range of use cases from the mundanely simple to the increasingly complex.
- Glue script?
- Web crawling?
- Web server?
- Testing?
- Micro-service?
- Network automation?
- Data Science?
- Machine Learning?
Python is likely a quick way to get any of these tasks done.
Including the abundant number of packages that can be found on Python Package Index, there is likely a package that can help you.
Do you want to download a webpage?
{{< highlight bash >}} pip install requests {{< /highlight >}}
and then invoke the Python interpreter:
{{< highlight python >}} Python 3.7.0 (default, Jun 29 2018, 21:56:58) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import requests requests.get('https://www.theregister.co.uk/').text {{< /highlight >}}
After that, there is any number of things that can be done with the results.
As you can probably note, the syntax is simple and clean, which makes returning to your code months later less of a jarring experience.
Popularity
According to Stack Overflow Stats, Python has surpassed C# and PHP in popularity and is the 3rd most loved language, after Rust and Kotlin. Interestingly, it is "the most wanted language" for the second year in a row.
Drawbacks
Is Python the magical solution to all the world's problems? No.
Python is not very suitable for much of the following:
- Static typing
- Performance-critical application (i.e. graphically-intense video game)
- Mobile app development
- Front-end web development
Conclusion
So should you learn it? or stick with shell scripting?
Because of Python's simple syntax, dynamic typing and abundant Package Index, it makes the language a great asset to have in your toolchain.
And it hasn't hurt that giants like Google, Facebook and Microsoft have invested heavily in Python.
Resources
This list includes some truly remarkable resources for improving your Python: