Python is a dynamically typed programming language suited best for quick prototyping or scripting.
Let's try creating a simple program using basic development tools.
- Prerequisite: Python development environment setup
Creating the First Program in Python
Using venv
is not required.
But, if you work on any non-trivial project with third-party
library dependencies, etc.,
then it is a good practice to use virtual environment.
$ mkdir first-program && cd $_
$ python3.10 -m venv venv
$ ls
venv
$ source venv/bin/activate
(venv) $ python --version
Python 3.10.4
(venv) $ cat > first-program.py
print("hello!")
^D
(venv) $ python first-program.py
hello!
(venv) $ deactivate
C C++ C# Clojure Crystal D Dart Erlang F# Go Haskell Java Javascript Julia Kotlin Lua Rust Scala Swift Typescript