Python – Syntax
Python – Syntax:
In this tutorial, you will learn the python syntax and an example about how to write a basic but popular Hello World print program.
Note : In this tutorial, we are using python version 3.5. Hence all the examples reflect the same results as like we execute in Python 3.5
Example:
>>> x="Hello World" >>> print(x) Hello World
In above Python terminal, x is a variable where we have assigned a value as hello world in double quotation as it is the string value. Then, we used print function to print the variable x which is in parenthesis. Do remember that we have given parenthesis for variable in print function.
Example:
>>> x=2 >>> print(x) 2 >>>
Share: