Python is a powerful, high-level, and easy-to-learn programming language used for building websites, software, automations, data analysis, artificial intelligence, and much more.

|Interpreted|Code runs line by line (no need to compile)| |Object-Oriented|Supports classes and objects| |Dynamically Typed|No need to declare variable types| |Portable|Runs on Windows, Linux, Mac, etc.|

Virtual environment

💡 Pro Tip: Never make this mistake again (The Guardrail)

If you want to completely protect yourself from ever accidentally installing packages globally, you can tell pip to refuse to install anything unless a virtual environment is active.

You can do this by adding an environment variable to your Windows system, or just run this command in your PowerShell to set it for your current session:

PowerShell

$env:PIP_REQUIRE_VIRTUALENV="true"

trick

where.exe python
 

In Python, any function that uses the word yield instead of return is a generator function.