Python - Small Notes

An Vo - Feb 19 - - Dev Community
  • Python allows you to change the datatype of a variable. int -> string -> float -> int
a = 1 # int  
a = "testing" # string
Enter fullscreen mode Exit fullscreen mode

It's different from other languages such as C#, Java, and Swift.

  • Create a Python environment.
pip install pipenv
pipenv shell #create a new environment
pip i
Enter fullscreen mode Exit fullscreen mode

OR

# create a new virtual environment
python3 -m venv .venv

#activate environment
source .venv/bin/activate
Enter fullscreen mode Exit fullscreen mode
. .