PYTHON SYNTAX

 

What is Syntax?

In simplest words, Syntax is the arrangement of words and phrases to create well-formed sentences in a language. In the case of a computer language, syntax is the structural arrangement of comments, variables, numbers, operators, statements, loops, functions, classes, objects, etc. which helps us understand the meaning or semantics of a computer language.

 

E.g. a ‘comment’ is used to explain the functioning of a block of code. It starts with a ‘#’.

More on comments in the comments chapter.

 

E.g. a block of code is identified by an ‘indentation’.

for i in range(5):
    print(i)

Comments

Popular posts from this blog

Python Input and Output Operations

PYTHON INTRODUCTION:-