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 .py files
  • 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.


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
Advertisment
StudioPress
Get Surfshark VPN
rocket.net