November 2001
Beginner
320 pages
5h 53m
English
There are some basic rules that apply to all programming languages, such as how lines are formed, how we introduce comments, and how the core of the language such as statements and expressions are organized.
Python uses a very simple structure for the individual lines which make up your script. Semicolons, used in Perl to terminate each line, are optional. Instead, Python uses the normal line termination, linefeed and or carriage return to indicate the end of each statement:
print "Hello World!" print "I am a test program"
The Python interpreter expects to see the correct line termination according to the platform you are working on – using a Unix-sourced script on a Mac without first translating the carriage returns ...