Python Visual Studio Code
▌Introduction
Let’s see
how to get the VSCODE ready for developing Python.
▌Configuration
▋Install Python
▋Install Python packages
Pylint: source code analyzer
$ python –m pip install
pylint
|
$ python –m pip install autopep8
|
▋Install VSCODE extensions
▌Implement
Create a
*.py file and write some codes.
# Number
num1 = 10
num2 = 20
num1 += 5
num2 += 5
sum = num1 + num2
print("Total = " + str(sum))
# Array
list = []
list.append("JB")
list.append("Lily")
list.append("Leia")
list.append("Hachi")
list.remove("Hachi")
for value in list:
print("Name :
" + value)
And use Shift+ALT+f to format the codes.
After the
codes are done, press F1 and key in “run
code” to run the codes.
(Or use
hot keys as the following picture)
▋Result
[Running] python "e:\Works\Source
control\Github\KarateJB\Python.Practice\src\helloworld.py"
Total = 40
Name : JB
Name : Lily
Name : Leia
[Done] exited with code=0 in 0.159 seconds
▌Reference