Python: Coming from Another Language
🔥 Rapid fire bullet points to get you up and going in Python

Coming from Java, JS, Ruby, or any other language? Here are some quick pointers to get you up and running. 🏃
Which IDE 📝
- Any language-agnostic IDE you already use would be best (VS Code, Sublime)
- PyCharm if you like the IDEA family of IDEs (and don’t mind installing yet another variant).
Which package manager 📦
Pip is the Python package manager.
The best way to work with packages is with Python’s built-in venv (virtual environment) module. This creates an isolated env for your application where you can install packages.
It’s a good idea to install packages to a venv because when pip inevitably messes up you can generate a fresh env with the latest versions of packages.
PyCharm has built in venv tools at project creation.
Which Python version 🤔
Depends on why you’re learning and what tools you want to learn alongside Py. If you’re wanting to use a certain library (NumPy, Django) check the required version.
Otherwise install the latest stable. 3.10.x in particular has amazing new error handling. As of Dec. 21, 3.6 is the earliest version I’d recommend.
If you’re reading this and you know you have to use Python 2.x for any reason, I’m sorry. It’s totally depreciated and you won’t have any fun. Just be sure not to try 3.x syntax on 2.x.
Python is dynamically typed ✍️
You have the option to annotate the type of your arguments, functions, or classes, but this is glorified documenting. What’s controversial about the type annotations are both: they’re optional and non impactful. That means you can annotate that your function returns a string, but Python will happily let it return an integer for example.
Tools like MyPy can read these optional Type annotations, adding an additional way to debug.
Everything is an object ➡️
Everything is an object with a type and metaclass. Exceptions (errors), strings, functions, all of it. You can programmatically check the type of an option with the type(object) function. Use dir(object) to check an object’s methods and properties, or the more verbose help(object).
Object, instance, type, and class are all used synonymously.
Linting, import sorting, and file reformatting 🎨
Two tools I recommend for formatting and sorting imports are Black and isort respectively.
I can’t confidently recommend any linter over another. I’ll edit this if I ever make a decision.
Readability is a huge deal in the Python community.
Project structure and generator 🗂
Shockingly, there’s no real consensus on how to structure your project or app. Nor is there a default project generator. Poetry tries to remedy both of these issues and does a pretty good job at it. It also manages your packages, making it a good tool to learn if you don’t mind the extra mind-flooding.
Binaries and executables are possible but not common ⚙️
There’s a variety of tools that compile your Python to a binary or .exe. Note compiling does not speed up the performance of your apps. The real benefit of making one is that the end-user doesn’t need to install python or the required packages.
Python apps are almost never shipped this way though. Common shipping practices are using PyPi and PIP, Docker Containers, and of course GitHub.
