Variables

In Python, variables can be created on-the-fly. There is no need to specify a type, or even to declare it. Just assign a value to it, like this:
x=4
creates a variable x and assigns the value 4.

Yet, Pythons variables do have a type. They can be e.g. numbers, strings, arrays or lists. The following lines demonstrate some of the properties of different types:

In []: x=3
In []: y="5"

In []: x*2
Out[]: 6

In []: x*x
Out[]: 9

In []: x+x
Out[]: 6

In []: y*2
Out[]: '55'

In []: y*y TypeError

In []: y+y
Out[]: '55'

In []: x+y TypeError

In []: print str(x) + y
35
You can always ask what type a variable x has by using
type(x)