Affiliate link
Python - Introduction
Python is a high-level, general-purpose programming language. Python is an interpreted language, which means that you can write and execute your code without having to compile it first.
What Python use for?
- Web applications
- Workflows
- Backend applications with database, files, server operations
- Big data, Artificial Intelligence, Machine Learning
Python - Installation
Download Python or Anaconda to start using Python.
To run your Python code, you can use
- Python's built-in interactive interpreter
- Store Python code in
.pyfiles - Jupyter Notebooks, Jupyterlab, Google CoLab
Python syntax
print("Hello, World!")Python syntax - Indentation
Indentation requires either 2 or 4 spaces at the beginning of the code line.
Spaces are the preferred indentation method.
Python disallows mixing tabs and spaces for indentation. For more info, refer to https://peps.python.org/pep-0008/#tabs-or-spaces
Python uses indentation to indicate a block of code.
if 8 > 1:
print("Eight is greater than one!")Python syntax - Continue code line
Python code lines can be split to multiple lines using \.
a = 'Welcome to LearnCodeNow! ' + \
'Learn Python free and easy. ' + \
'Python is a high-level, general-purpose programming language.'Python syntax - Comment
Python only support single-line comment using #.
# This is a comment
a = 1
Affiliate link
Affiliate link




