Indentation

In Python, indentation is used to indicate a block of code. Example:

x = 1
y = 2

if x < y:
  print("x is less than y!")
  print("Let's dance")
  
print("Apple")

if x > y:
  print("x is greater than y!")
  print("Let's go home!")
  
print("Orange")

The result is as below:

Comment

A single line comment starts with a #. Example:

# Create two variables — x and y — and assign values to them
x = 1
y = 2

# Print the values of x and y to the console
print(x)
print(y)

A multiple line comment is placed between two triple quotes. Example:

"""
In this example, we 
create two variables — x and y — and assign values to them. 
After that, print the values of x and y to the console
"""

x = 1
y = 2
print(x)
print(y)