In this tutorial, you'll use Python 3 to create a simple "Hello World" Python application in Visual Studio Code. ThroughPython-extension, turn your VS code into a great, lightweight Python editor.
In this tutorial, you'll learn about VS Code for Python development, specifically how to edit, run, and debug code with the following tasks:
- Write, run, and debug a "Hello World" application in Python
- Learn how to install packages by creating Python virtual environments
- Write a simple Python script to plot numbers in VS Code
This tutorial is not intended to teach you Python itself. Once you learn the basics of VS Code, you can do anything fromprogramming instructions at python.orgunder VS Code for an introduction to the language.
If you have problems, you can search the page for an answer or ask a questionPython Extensions Discussions Questions and Answers.
Requirements
To successfully complete this tutorial, you must first set up your Python development environment. Specifically, this guide requires:
- Python 3
- Code VS
- Python extension of VS code
Install Visual Studio Code and the Python extension
If you haven't already, install itCode VS.
Then installPython extension for VS Codefrom the Visual Studio Marketplace. For more information about installing extensions, seeexpansion market. The name of the Python extensionPythonand is published by Microsoft.
Install the Python interpreter
With the Python extension, you must install the Python interpreter. Choosing a translator depends on your specific needs, but here are some guidelines.
ramen
installPython used python.org. You can usually useDownload Pythonbutton that appears first on the page to download the latest version.
Remark: If you don't have administrative access, an additional option to install Python on Windows is to use the Microsoft Store. The Microsoft Store offers installationssupported versions of python.
For more information about using Python on Windows, seeUsing Python on Windows at Python.org
Mac operating system
Installing Python on macOS is not supported. Instead, a package management system such asCook yourselfit is recommended. Use to install Python with Homebrew on macOSbrew install python3
u de Terminal-prompt.
RemarkOn macOS, make sure the VS Code installation location is included in the PATH environment variable. Seethese installation instructionsFor more information.
Linux
The built-in installation of Python 3 on Linux works fine, but to install other Python packages, you'll need to install themPip
zget-pip.py.
other options
Data science: If your primary purpose of using Python is Data Science, consider downloading sHe liked it. Anaconda provides not only a Python interpreter, but also many useful data science libraries and tools.
Windows Subsystem for Linux: If you use Windows and need a Linux environment to work with Python,Windows Subsystem for Linux(WSL) is the option for you. If you choose this option, you will also want to installWSL-extension. For more information on using WSL with VS Code, seeVS remote code developmentor try toRad the WSL Tutorialwhich walks you through configuring WSL, installing Python, and creating a Hello World application that runs on WSL.
Check your Python installation
To verify that Python has been successfully installed on your computer, run one of the following commands (depending on your operating system):
Linux/macOS: open a terminal window and type the following command:
python3 --version
Windows: Open a command prompt and run the following command:
(Video) Learn Python 3: Visual Studio Code for Beginnerspy-3--version
If the installation was successful, the launch window should show the installed version of Python.
RemarkYou can use
py-0
command in VS Code's integrated terminal to view the versions of python installed on your computer. The default interpreter is marked with an asterisk (*).
Run VS Code in the workspace folder
Running VS code in a folder makes that folder your "workspace". VS Code stores settings specific to this workspace.vscode/settings.json
which are independent of globally saved user settings.
Using the command line or terminal, create an empty directory called "hello", navigate to it, and open VS Code (to code
) in this folder (.
) by entering the following commands:
hello thereCDHelloto code.
Remark: If you're using Anaconda, make sure you're using Anaconda's command line.
Alternatively, you can launch VS Code from the operating system's user interface and then use itFile > Open Folderto open the project folder.
Select the Python interpreter
Python is an interpreted language. So to run python code and get python intellisense, you need to tell VS Code which interpreter to use.
From VS Code, select the Python 3 interpreter by opening the fileCommand palette(⇧⌘str(Windows, LinuxCtrl+Shift+P)), start typingPython: Choose an interpretersearch, and then select a command. You can also use the so-calledSelect the Python environmentoption in the status bar, if available (it may also already show the selected translator):
The command presents a list of available interpreters that VS Code can find automatically, including virtual environments. If you don't see the translator you want, take a lookSet up Python environments.
Remark: When using the Anaconda distribution, the correct interpreter must have a suffix
("osnova": conda)
, For examplePython 3.7.3 64-bitni ("base":conda)
.
Interpreter selection determines which interpreter the Python extension will use for that workspace.
Remark: If you select an interpreter without an open workspace folder, VS code
python.defaultInterpreterŚcieżka
instead of at the user scope which is generally set by the default VS code interpreter. The user setting ensures that you always have a default interpreter for python projects. Workspace settings allow you to override user settings.
Create a Python Hello World source code file
Select the file from the Explorer toolbarnew filebutton onHello
duration:
Give the file a namehoi.py
and it will automatically open in the editor:
door.py
file, you tell VS Code to interpret that file as a Python content evaluator with a Python extension and interpreter of your choice.
Remark: The File Explorer toolbar also lets you create folders in your workspace to better organize your code. You can useNew cardbutton to quickly create a folder.
Now that you have the code file in your workspace, enter the following source codehoi.py
:
message ="Hello World"to print(message)
When you start writingto print
, notice howIntelliSensepresents auto-completion options.
IntelliSense and auto-completion work with standard Python modules and other packages installed in the chosen Python interpreter environment. It also provides completions of methods available for object types. For example becausemessage
variable contains a string, IntelliSense provides string methods as you typemessage
:
You can experiment a bit more with IntelliSense, but then undo the changesmessage
variable ito print
call and save the file (⌘S(Windows, LinuxCtrl+S)).
For more information on editing, styling, and refactoring, seeEdit the code. The Python extension also has full support forfight.
Start Hello World
It is easy to usehoi.py
with Python. Just clickRun the python file in the terminalthe play button in the upper right corner of the editor.
The button opens a terminal panel where the Python interpreter is automatically activated and then startedpython3 halo.py
(macOS/Linux) lubpython halo.py
(Ramen):
There are three other ways to run Python code in VS Code:
Right-click anywhere in the editor window and selectRun the python file in the terminal(which automatically saves the file):
Select one or more lines, then pressShift+Enteror right-click and selectExecute the selection/rule in python terminal. This command is useful for testing only part of a file.
From the command palette (⇧⌘str(Windows, LinuxCtrl+Shift+P)), ChoosePython: Run REPLcommand to open a terminal REPL for the currently selected python interpreter. In the REPL, you can then enter and execute lines of code one by one.
Configure and run the debugger
Now let's try to debug our simple Hello World program.
First set a breakpoint on line 2hoi.py
placing the cursor onto print
call and pressF9. Or just click on the left pane of the editor, next to the line numbers. When a breakpoint is set, a red circle appears in the margin.
Then press to run the debuggerF5. Since this is the first time you are debugging this file, a configuration menu opens from the command palette where you can select the type of configuration to debug for the open file.
Remark: VS Code uses JSON files for all its various configurations;run.json
is the default name of the debug configuration file.
These different configurations are fully explained inDebugging configurations; just choose nowpython zaliha, which is a configuration that executes the current file displayed in the editor using the currently selected Python interpreter.
You can also start the debugger by clicking the down arrow next to the run button in the editor and selectingDebug python file in terminal.
The debugger stops at the first line of the file breakpoint. The current row is marked with a yellow arrow in the left margin. If you are researchingLocalthe variables window at this point will now see definedmessage
the variable appears in theLocalglas.
The Debug toolbar appears at the top with the following commands from left to right: continue (F5), krok nad (F10), Enter (F11), Exit (⇧F11(Windows, LinuxShift+F11)), restart (⇧⌘F5(Windows, LinuxCtrl+Shift+F5)), and stand (⇧F5(Windows, LinuxShift+F5)).
The status bar also changes color (orange in many themes) to indicate that you are in debug mode. ThePython Debug consoleit also automatically appears in the lower right pane to display the commands that are executed along with the program output.
To continue running the program, select Continue on the Debug toolbar (F5). The debugger runs the program to the end.
AdviceDebug information can also be viewed by hovering over code such as variables. In case of
message
, when you hover over a variable, a string of characters is displayedHello world
in the box above the variable.
You can also work with u variablesDebug console(If you don't see it, select itDebug consolein the lower right of the VS Code or select it...menu.) Then try entering the following lines one by one, w>query at the bottom of the console:
messagemsg.capital()msg.split()
Choose blueBuckle upagain on the toolbar (or press F5) to run the program to the end. "Hello World" appears in thePython Debug consoleif you go back to it and VS Code exits debug mode after the program exits.
If you restart the debugger, the debugger stops at the first breakpoint.
To stop the program before it finishes, use the red square stop button on the debug toolbar (⇧F5(Windows, LinuxShift+F5)) or usedStart > Stop met foutopsporingmenu command.
See for detailsDebugging configurations, which contains notes on using a particular Python interpreter for debugging.
Tip: Use points to log in instead of printing statements: Developers often make source code cluttered
to print
instructions for quickly viewing variables without going through each line of code in the debugger. In VS Code you can use this insteadPoints to apply. A log point is similar to a breakpoint, except that it logs a message to the console and does not stop the program. For more information seePoints to applyin the main VS Code Debugging article.
Install and use packages
Now let's look at an example that is a little more interesting. In Python, packages are a way to get any number of usable code libraries, usually from themPyPI. In this example, usematplotlib
andnumber
packages for creating graphical charts, as is often the case in data science. (Notice thismatplotlib
cannot display graphs during operationWindows Subsystem for Linuxbecause it doesn't have the necessary UI support).
Back totrackerview (top left icon showing files), create a new file namedstandard graph.py
and paste the following source code:
importmatplotlib.pyplotHowpltimportnumberHownpx = np.linspatie(0,20,100)# Create a list of evenly spaced numbers in a rangeplt.plot(x, np.sin(x))# Draw the sine of each point xplt.show()# View the chart
Advice: If you enter the above code manually, the autocompletes can be renamed after this
How
keywords when pressedA nurseat the end of the line. Enter a space to avoid thisA nurse.
Then try running the file in the debugger using the "Python: current file" configuration, as described in the last section.
Unless you are using the Anaconda distro or have it pre-installedmatplotlib
package, you should see a message,"ModuleNotFoundError: No module named 'matplotlib'"". Such a message means that the requested package is not available on your system.
installmatplotlib
package (which also installsnumber
as a dependency), stop the debugger and use the command palette to launch itTerminal: Create a new terminal(⌃⇧`(Windows, LinuxCtrl+Shift+`)). This command opens a command prompt for the selected interpreter.
A best practice among Python developers is to avoid installing packages in the global interpreter environment. Use project-specific insteadvirtual environment
which contains a copy of the global interpreter. Once this environment is activated, all installed packages are isolated from other environments. This isolation reduces many of the complications that can arise from conflicting package versions. to createvirtual environmentand install the required packages, enter the following commands appropriate for your operating system:
Remark: For additional information on virtual environments, seeEnvironment.
Create a virtual environment using the Create Environment command
From within VS Code, you can create non-global environments with Venv or Anaconda by opening the command palette (⇧⌘str(Windows, LinuxCtrl+Shift+P)), start typingPython: Creating an environmentsearch, and then select a command. You can also callPython: Creating an environmentcommand on the Getting Started with Python page.
The command presents a list of environment types, Venv or Conda. Select in this exampleVenv.
The command then lists the compilers that can be used in the project.
After selecting the desired interpreter, a notification shows the progress of environment creation and an environment folder appears in your workspace.
The command also installs the necessary packages described in the requirements/dependencies file, such as
requirements.txt
,pyproject.toml
, Lubenvironment.yml
, in the project folder.Remark: If you want to create an environment manually or encounter an error while creating an environment, please visit the pageEnvironmentkant.
Make sure the new environment is selected using the filePython: Choose an interpreterfrom regulationCommand palette.
Install the packages
# Do not use with Anaconda distributions as they already include matplotlib.# Mac operating systempython3 -m pip instalater matplotlib# Windows (may require booting)py -m pip install matplotlib#Linux (Debian)apt-get install python3-tkpython3 -m pip instalater matplotlib
Now run the program again (with or without the debugger) and after a few moments a graph window will appear with the result:
When you're done, type
deactivate
in the terminal window to deactivate the virtual environment.
For more examples of creating and activating a virtual environment and installing packages, seeThe Django GuideandBottle guide.
Next steps
You can configure VS Code to use any installed Python environment, including virtual and conda environments. You can also use a separate debugging environment. See for detailsEnvironment.
Follow one of the to learn more about Pythonprogramming lessonslisted on python.org in the context of VS Code.
Check out the following tutorials to learn how to develop web applications using the Django and Flask frameworks:
- Using Django in Visual Studio Code
- Using Flask in Visual Studio Code
So there's a lot more to explore in Python in Visual Studio Code:
- Python profile template- Make new onesprofilewith a select set of extensions, settings and code snippets
- Edit the code- Learn about auto-completion, IntelliSense, formatting and refactoring in Python.
- fight- Activate, configure and deploy various python linters.
- Debugowanie- Learn to debug Python both locally and remotely.
- Test- Set up test environments and discover, run and debug tests.
- Item reference- Explore the full range of Python-related settings in VS Code.
- Implementirajte Python u Azure App Service
- Deploy Python in containerized applications
20.01.2023
FAQs
Getting Started with Python in Visual Studio Code textbook? ›
Visual Studio Code is a free source code editor that fully supports Python and useful features such as real-time collaboration.
Is VS Code good for Python beginners? ›Visual Studio Code is a free source code editor that fully supports Python and useful features such as real-time collaboration.
Is Visual Studio code good for Python? ›VS Code comes with great debugging support for Python, allowing you to set breakpoints, inspect variables, and use the debug console for an in-depth look at how your program is executing step by step. Debug a number of different types of Python applications, including multi-threaded, web, and remote applications.
How to install Python libraries in Visual Studio Code? ›Open the Marketplace by clicking the Extensions tab on the VS Code activity bar. Search for “Python” in the search bar. Select the extension named “Python” and then click Install.
Is PyCharm better than VS Code for Python? ›PyCharm is the way to go if you want a powerful, focused, and well-configured Python development environment. However, VS Code is preferred if you want something lightweight with the ability to customize. Both are excellent tools that, depending on how you choose to utilize them, can be used for a variety of tasks.
Is Python easier to code than Java? ›Python vs Java: which one to learn? There is a consensus that Python is a more suitable choice for beginners since its syntax is fairly easy and clear. Plus, Python is a more user-friendly and intuitive language. Java, in turn, is more complex and challenging.
What is the difference between Visual Studio and Visual Studio Code for Python? ›Visual Studio vs Visual Studio Code - Differences
Visual Studio is an Integrated Development Environment, also known as an IDE. Visual Studio Code is a code editor. A developer can easily edit their code. VS is slower when it comes to performing across different platforms.
PyCharm is a dedicated Python Integrated Development Environment (IDE) providing a wide range of essential tools for Python developers, tightly integrated to create a convenient environment for productive Python, web, and data science development.
Should I use VS Code or PyCharm? ›Code Management, Completion, and Refactoring
PyCharm supports code completion, and users typically find it accurate and useful. PyCharm can be used for refactoring and features a much larger feature set than VSCode, including: Rename. Method extraction.
- Step 0: Installation.
- Step 1: Create a Python project (this article)
- Step 2: Write and run code to see Visual Studio IntelliSense at work.
- Step 3: Create more code in the Interactive REPL window.
- Step 4: Run the completed program in the Visual Studio debugger.
How to set Python in Visual Studio? ›
- Python in Visual Studio tutorial step 1, create a project.
- Python in Visual Studio tutorial step 2, write and run code.
- Python in Visual Studio tutorial step 6, work with Git.
- Python in Visual Studio tutorial step 4, debugging.
- Install Python support - Visual Studio (Windows)
The most basic and easy way to run a Python script is by using the python command. You need to open a command line and type the word python followed by the path to your script file like this: python first_script.py Hello World! Then you hit the ENTER button from the keyboard, and that's it.
How to install numpy in Python? ›- It will show the location and numpy version installed.
- Python is pre-installed on Ubuntu computers. ...
- Type command apt install python-pip python-pip3.
- Type command pip install numpy.
- Conda is an open-source environment and package system.
To install Pandas using pip, enter pip install pandas or pip3 install pandas in the terminal or command line. To install Pandas using conda, execute the following command on a terminal or command line: conda install pandas. ImportError usually arises when the Python working environment doesn't recognize pandas.
Does it matter which IDE you use for Python? ›There are two main types of IDEs for Python: those designed for experienced developers and those designed for beginners. Experienced developers often prefer IDEs that offer more features and allow them to customize the development environment to their preferences.
Is VS Code beginner friendly? ›While marketing primarily to professional programmers, VS Code is an excellent editor for students and other learner just getting started with HTML and CSS.
Should a beginner use PyCharm? ›It makes Python development accessible to those who are new to the world of software programming. PyCharm Community Edition is excellent for developers who wish to get more experience with Python. It also provides access to other languages such as Rust, Dart, HTML, and XML.
How many days it will take to learn Python? ›In general, it takes around two to six months to learn the fundamentals of Python. But you can learn enough to write your first short program in a matter of minutes. Developing mastery of Python's vast array of libraries can take months or years.
What is the hardest programming language to learn? ›Malbolge. This language is so hard that it has to be set aside in its own paragraph. Malbolge is by far the hardest programming language to learn, which can be seen from the fact that it took no less than two years to finish writing the first Malbolge code.
Which pays more Java or Python? ›2. Python vs Java Developer Salary Comparison. As per the 2021 Stack Overflow Survey, professional Java developers earn $51,888/year globally, whereas dedicated Python developers earn $59,454k/year globally.
Should I use VS or VS Code for Python? ›
If you need to collaborate with team members on development or debugging, then Visual Studio is the better choice. If you need to do serious code analysis or performance profiling, or debug from a snapshot, then Visual Studio Enterprise will help you. VS Code tends to be popular in the data science community.
Why is Visual Studio Code better than Jupyter notebook? ›The first really great feature that comes with VS Code is the Intelligence auto-completion. The editor can display member lists, method docstrings, and parameter hints. Another feature, useful for keeping track of the variables that live in memory is the variable explorer and data viewer.
Which Python does Visual Studio Code use? ›Getting Started with Python in VS Code. In this tutorial, you will use Python 3 to create a simple Python "Hello World" application in Visual Studio Code. By using the Python extension, you turn VS Code into a great, lightweight Python editor.
Why VS Code is better than PyCharm? ›Visual Studio Code has a larger extension ecosystem, thus making it more customizable and versatile. PyCharm has a smaller ecosystem, but it comes with more features. VS Code has IntelliSense to save you from typing. In addition, it has a GitHub CoPilot extension that makes coding faster.
Is Jupyter a Python IDE? ›Jupyter Notebook is probably the first Python IDE we used for data science. Its simplicity makes it great for beginners, but whenever you need some advanced functionality, you'll see that Jupyter Notebook has a lot of limitations.
Is there a better IDE than VS Code? ›Atom, Visual Studio, Eclipse, IntelliJ IDEA, and WebStorm are the most popular alternatives and competitors to Visual Studio Code.
Which language is best for VS Code? ›Learn about programming languages supported by VS Code. These include: C++ - C# - CSS - Dart - Dockerfile - F# - Go - HTML - Java - JavaScript - JSON - Julia - Less - Markdown - PHP - PowerShell - Python - R - Ruby - Rust - SCSS - T-SQL - TypeScript.
Is it better to code in C or Python? ›Python is a more robust programming language compared to C as it has strong memory management schemes. The C programming language is mostly used for the development of hardware applications. The number of built-in functions in C are very limited. There are a lot of built-in functions in Python.
What is Python used for? ›Python is often used as a support language for software developers, for build control and management, testing, and in many other ways. SCons for build control. Buildbot and Apache Gump for automated continuous compilation and testing. Roundup or Trac for bug tracking and project management.
How do I debug Python code in VS Code? ›Basic debugging
If you're only interested in debugging a Python script, the simplest way is to select the down-arrow next to the run button on the editor and select Debug Python File in Terminal.
Do I need to install Python before Visual Studio? ›
Visual Studio automatically detects existing Python installations. See The Python Environments window. Also, if a newer version of Python is available than what's shown in the installer, you can install that version separately and Visual Studio will detect it.
Which is better PyCharm or Visual Studio? ›Microsoft Visual Studio has 2788 reviews and a rating of 4.62 / 5 stars vs PyCharm which has 323 reviews and a rating of 4.7 / 5 stars. Compare the similarities and differences between software options with real user reviews focused on features, ease of use, customer service, and value for money.
What is the NumPy in Python? ›NumPy (Numerical Python) is an open source Python library that's used in almost every field of science and engineering. It's the universal standard for working with numerical data in Python, and it's at the core of the scientific Python and PyData ecosystems.
How to install pip in Python? ›- Step 1: Download PIP get-pip.py. Before installing PIP, download the get-pip.py file. ...
- Step 2: Installing PIP on Windows. To install PIP type in the following: python get-pip.py. ...
- Step 3: Verify Installation. ...
- Step 4: Add Pip to Windows Environment Variables. ...
- Step 5: Configuration.
To create your first Python file, navigate to the folder that you would like to create your file in and create a file called test.py. Next, open this file up in a text editor and type in the following code: print("Hello, World!") Save your file, and in the terminal, navigate to the file's location.
How easy is Python for beginners? ›No, Python isn't hard to learn for most people. In fact, Python is considered one of the easiest programming languages to learn. While anyone can learn Python programming — even if you've never written a line of Python code before — you should expect that it will take time, and you should expect moments of frustration.
How to use pip in Python? ›- ExampleGet your own Python Server. Check PIP version: ...
- Download a package named "camelcase": C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip install camelcase.
- Import and use "camelcase": import camelcase. ...
- Uninstall the package named "camelcase": ...
- List installed packages:
numpy , here, is an example of a metapackage, while numpy-base is the original numpy library package. When a conda package is used for metadata alone and does not contain any files, it is referred to as a metapackage.
How to install Python in Windows? ›- Basics to Advanced - Learn It All! ...
- This will take you to the page where the different Python releases for Windows can be found. ...
- Once the executable file download is complete, you can open it to install Python.
Importing pandas means bringing all of the pandas functionality to your finger tips in your python script or jupyter notebook.
How pandas work in Python? ›
pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with “relational” or “labeled” data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real-world data analysis in Python.
Can beginners use VS Code? ›While marketing primarily to professional programmers, VS Code is an excellent editor for students and other learner just getting started with HTML and CSS. This course focuses mainly on those students and learners who in the beginner to intermediate stages of learning to code with HTML, CSS, and JavaScript.
Which Python is best for beginners? ›Python3's modifications have made it easier for beginners to understand, making it the greatest way to learn Python for the first time.
What is the best way to run Python for beginners? ›The most basic and easy way to run a Python script is by using the python command. You need to open a command line and type the word python followed by the path to your script file like this: python first_script.py Hello World! Then you hit the ENTER button from the keyboard, and that's it.
How long should I code as a beginner? ›Most coders agree that it takes three to six months to be comfortable with the basics of coding. But you can learn coding faster or slower depending on your preferred pace.
What is the easiest coding platform? ›- Python. Python is a high-level programming language that's more for general purposes. ...
- C. One of the longest-standing programming languages, C is a general-purpose language that's very popular and flexible in its use. ...
- Ruby. ...
- Java. ...
- JavaScript.
Python is one of the most chosen programming languages to learn first for its wide use and simplicity. Moreover, it is a great stepping stone to learning more complex programming languages and frameworks!
Can I start coding with no experience? ›Can I learn to code with no experience? While it's not easy, anyone can learn to code without prior experience. Coding is a lot like solving puzzles—if you enjoy that kind of problem-solving, then you will likely enjoy learning to code. If you're new to computer tech, try taking an online course.
What should I learn first before Python? ›You might think you need to know another programming language before you learn Python. On the contrary, Python's reputation as one of the easiest languages in the world precedes it. Some students learn JavaScript or Java first, but for beginners, Python serves just as well.
How can I learn Python by myself? ›- Step 1: Understand Why Most Fail. ...
- Step 2: Identify What Motivates You. ...
- Step 3: Learn the Basic Syntax, Quickly. ...
- Step 4: Make Structured Projects. ...
- Step 5: Work on Python Projects on Your Own. ...
- Step 6: Keep Working on Harder (and Harder) Projects.
How long does it take to learn Python? ›
In general, it takes around two to six months to learn the fundamentals of Python. But you can learn enough to write your first short program in a matter of minutes. Developing mastery of Python's vast array of libraries can take months or years.
Where can I practice Python for beginners? ›- Dataquest.io has dozens of free interactive practice questions, as well as free interactive lessons, project ideas, tutorials, and more.
- HackerRank is a great site for practice that's also interactive.
- CodingGame is a fun platform for practice that supports Python.
If you're tired of reading Python how-to manuals, Head-First Python is the way to go! This book is a brain-friendly guide (as the title suggests), and it uses a more visual format to stimulate your brain rather than a text-heavy approach, which can quickly become boring.