Skip to content

A quick guide to Python programming language

Are you a beginner who has a keen eye for programming and coding? If yes, then you are about to receive well informed facts about a programming language that is in demand and is interesting to learn as well.


What is Python?

Python is a programming language that imparts the basic idea of the developer community: more functionality with less code. It is an interpreted language that supports the features of object oriented programming. Through a variety of frameworks and libraries, it makes the work of a coder easy and fast.


The following are key features of Python syntax:


It’s just white space, but indentation is important.

The programming languages around the world emphasize various methods to start and end statements. The most common way to do this is curly braces {} , which is the start and end of flow in a block of code. Python is different in this case.

The blank space in the syntax is what matters, and it is called an indentation. If you wish to execute a block of code and have the interpreter see it as a separate unit, indentation is used and it is preceded by a colon “:”


The Semi colon has the least use!

Consider writing code in programming languages like C and Java. You will write a long code, sometimes100 lines of code, and all the logic will be correct. You run it and an error pops up “expected; in line 5”.  Don’t worry, even a skilled developer omits semi colon, it is the most common error! What if Python provides you the option to write code without the use of terminations like the semi colon? Yes, it’s true! The semi colon is used only when we are writing many statements in a single line otherwise it is the least used in this code.


How to continue a statement in multiple lines?


As described earlier, Python has no use for terminators in the code. If the Developer writes the code statement in two lines, the interpreter thinks that these are two different statements. This isn’t the case in some of the other programming languages. If there isn’t a semicolon in between the statements, the compiler can think of it as one statement.

So, what should be done if we wish to continue a single statement in multiple lines to increase readability?

Python introduces the use of the “\” marker. Basically, write the statement in the first line, end it with a “\” and the interpreter will understand that there might a continuation of the current line.


The use of comments in Python

When coding, a developer may feel the need to write extra information for his own understanding or for readability, these are nothing but comments. Comments are an integral part of the code.

In Python, comments are represented by “#”. So, while “#” is used in languages like C to include useful libraries, it only signifies the use of comments in the Python syntax.  

Resource box-

If you find these features of Python interesting, check out python online course certification to increase your skills as a Python programmer and build the intellectual ability to solve problems based on Python.

Back to main screen