As someone who has never used Python, has never had the need to, and doesn't know the first thing about it - can someone quickly sell it to me?
And also, perhaps, recommend something for pure beginners to the language? I know C/C++/C#/Obj-C, Java, Swift, JS, PHP, et al, to give some context.
For example, if I have to design software for a micro-controller that uses C/C++ I sometimes write down the algorithm in Python (with editor support: auto-formatting, etc.), then I implement it in C/C++. There is no better way to write pseudo-code that I know of.
Python is also great to create a prove of concept for something. It allows for rapid prototyping due to the simple syntax, the high-level features, the huge ecosystem and the dynamic type system. Most of the time the result is good enough for production. You can add type annotations and get statically typing via mypy [0] to harden the code base. This works really well. (See: JS->TypeScript).
Python has a well developed FFI which allows you to call C/C++/Rust, without large performance hits. I think this is one of the main reasons for Python's success. It can be used as a high level interface to a huge low level ecosystem. ML wouldn't exist in Python without that.
Python is a great language to create simple scripts as well. I use it as a bash replacement.
But beware: Python can get really ugly if you rely too heavily on OOP/Inheritance. There is a lot of ugly Python code out there. I think Python shines the most if you use it in a procedural/semi-functional style and describe data-types for your business logic (almost) entirely with (dump) dataclasses [1] and namedtuples [2].
Beware2: Python's packaging story (package manager, etc) is currently in a messy state. There are good solutions, but it's difficult to find the right tools for a newcomer. I think it will take a couple of years for the dust to clear, but you might want to check out pipenv [7] or poetry [8]
These packages will make your life a lot easier. I use them for every project:
- black [3] or yapf [4] (auto-formatter)
- mypy [0] (statically typing with editor support for VSCode)
- pylint [5] or flake8 [6] (linter)
[0] https://github.com/python/mypy
[1] https://docs.python.org/3/library/dataclasses.html#module-da...
[2] https://docs.python.org/3/library/typing.html#typing.NamedTu...
[3] https://github.com/psf/black
[4] https://github.com/google/yapf
[5] https://github.com/PyCQA/pylint/
[6] https://github.com/PyCQA/flake8