O'Reilly logo

The Python Quick Syntax Reference by Gregory Walters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 1

image

Hello Python

Let’s review a simple Python program that will explain the use of the Python Interactive Shell along with a few tips.

Python’s Interactive Shell

Once you have Python installed on your system, you can use the Interactive Shell to try simple lines of code, debug some problematic code, and even use it as a simple calculator.

In a terminal (Linux) or Command Prompt (Windows), simply type:

python

If you are running on Linux, you will see something like this:

Python 2.7.3 (default, Apr 10 2013, 05:09:49)[GCC 4.7.2] on linux2Type "help", "copyright", "credits" or "license" for more information.>>>

Or if you are running on Windows ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required