《A Byte of Python》由会员分享,可在线阅读,更多相关《A Byte of Python(109页珍藏版)》请在金锄头文库上搜索。
1、A Byte of PythonSwaroop C HA Byte of Python Swaroop C H Copyright 2003-2005 Swaroop C HAbstractThis book will help you to learn the Python programming language, whether you are new to computers or are an experienced programmer.This book is released under the Creative Commons Attribution-NonCommercia
2、l-ShareAlike License 2.0 .Table of ContentsPreface .x Who This Book Is For .x History Lesson .x Status of the book .x Official Website .xi License Terms .xi Feedback .xi Something To Think About .xi 1. Introduction .1 Introduction .1 Features of Python .1 Summary .2 Why not Perl? .3 What Programmers
3、 Say .3 2. Installing Python .4 For Linux/BSD users .4 For Windows Users .4 Summary .5 3. First Steps .6 Introduction .6 Using the interpreter prompt .6 Choosing an Editor .6 Using a Source File .7 Output .7 How It Works .8 Executable Python programs .8 Getting Help .9 Summary . 10 4. The Basics . 11 Literal Constants . 11 Numbers . 11 Strings . 11 Variables . 13 Identifier Naming . 13 Data Types . 14 Objects . 14 Output . 15 How It Works . 15 Logical and Physical Lines . 15 Indentation . 17 Summary