Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Python Example

Python code is simple and easy to run. Here is a simple Python code that will print “Welcome to Python”.

A simple python example is given below.

  1. >>> a=“Welcome To Python”
  2. >>> print a
  3. Welcome To Python
  4. >>>


  • Here we are using IDLE to write the Python code. Detail explanation to run code is given in Execute Python section.
  • A variable is defined named “a” which holds “Welcome To Python”.
  • “print” statement is used to print the content. Therefore “print a” statement will print the content of the variable. Therefore, the output “Welcome To Python” is produced.

Python 3.4 Example

In python 3.4 version, you need to add parenthesis () in a string code to print it.

  1. >>> a=(“Welcome To Python Example”)
  2. >>> print a
  3. Welcome To Python Example
  4. >>>