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