The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages.
First Python Program
Let us execute the programs in different modes of programming.
Interactive Mode Programming
Invoking the interpreter without passing a script file as a parameter brings up the following prompt −
Python 3.5.2 (default, Dec 10 2013, 11:35:01)
[GCC 5.4.0] on Linux
Type "help", "copyright", "credits", or "license" for more information.
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
Type the following text at the Python prompt and press Enter −
>>> print ("Hello, Python!")
If you are running the older version of Python (Python 2.x), use of parenthesis as
function is optional. This produces the following result −