Python Tutorials – Hello, World!

Hello world python

Python is an exceptionally basic language, and has an extremely clear grammar. It urges software engineers to program without standard (ready) code. The easiest order in Python is the “print” mandate – it just prints out a line (and furthermore incorporates a newline, not at all like in C).

There are two significant Python adaptations, Python 2 and Python 3. Python 2 and 3 are very unique. This instructional exercise utilizes Python 3, since it all the more semantically right and supports more current elements.

For instance, one contrast between Python 2 and 3 is the print proclamation. In Python 2, the “print” proclamation isn’t a capacity, and consequently it is conjured without enclosures. In any case, in Python 3, it is a capacity, and should be conjured with brackets.

To print a string in Python 3, simply compose:

print("This line will be printed.")

Output : This line will be printed.

Indentation

Python utilizes space for blocks, rather than curly braces. The two tabs and spaces are upheld, however the standard indentation requires standard Python code to utilize four spaces. For Eg.:

x = 1
if x == 1:
# indented four spaces
print("x is 1.")

OUTPUT x is 1.

Author: Shantun Parmar

Leave a Reply

Your email address will not be published.