Everything in python is an object.
An object contains attributes, some of this attributes are callable and are called method. Are called function the callable attributes of the "module" objects.
Today I will present:
Before to start you need to open a terminal, moving inside the directory with
$ cd doc/python/
$ ipython notebook --pylab inline
You can modify the code inside the cell and execute with: "Shift + Enter" or with "Ctrl + Enter" or using the "play" icon above
2 + 2
Python have a huge library, therefore before to start to implement something you should check that it is not already implemented, moroever a lot of software is available outside the standard library have a look to the: Python Package Index
After you have insalled python before use function and object of a library you need to load the library inside your program:
Then you can start using variables that are defined inside, like:
Other ways to import things in python are:
import os, sys, time, math # import more than one library at the same time
import numpy as np # import a library changing its name
from timer import Timer # import only one thing from a library
from math import * # import all function and variables from the math library...