All python codes inside this site can be run with several ways, but the official and the best Cross-platform is python IDLE.
Step 1
Open your terminal for installing idle and type;
sudo apt-get install idle
Step 2
Terminal will ask to install IDLE type "Y" and Return;
Step 3
After installation complete you can type;
sudo idle
Step 4
This will open the IDLE GUI;
Step 5
Than you can run your scripts; using File>Open menu;
Step 6
Than select your python script, this will open your script in a new window;
Step 7
After this you can run your script with; pressing F5 key in your keyboard or Run>Run Module menu;
Step 8
Or you can just test your IDLE with this two simple lines;
#!/usr/bin/python
print 'Hello, world!'
Step 9
IDLE should give this expected output;
Hello, world!
>>>