Python Basics

Python Basics

The purpose of these tutorial is to quickly go thru the basics of Python. Some of the Python's characteristics:
Python Setup
Starting Python Shell

First Python Program: 'print' function can be used to print anything on Python console. Below print statement is standalone code.

Running Code from File: Code in the file can be executed using 'python' or 'python3' keyword followed by qualified file(with path). Click here to download the sample example file.

Python Help Utility: Help utility can be used to get the documentation and syntax of the functions. It can also be used to get the operations & functions available for the particular object. Example: Integer variable.


Escape Character in Python: There are times where users have to use some characters which are reserved in Python or have some specific function to do, For example use of single quote(') in sentence. Backslash(\) is the escape character available in Python.

Comments in Python

Exit Python Shell