You are previewing The Python Quick Syntax Reference.
O'Reilly logo
The Python Quick Syntax Reference

Book Description

The Python Quick Syntax Reference is the "go to" book that contains an easy to read and use guide to Python programming and development. This condensed code and syntax reference presents the Python language in a well-organized format designed to be used time and again.

You won't find jargon, bloated samples, case studies, or history of Hello World and computer theory in this handy reference. This Python syntax reference is packed with useful information and is a must-have for any Python developer.

What you'll learn

  • Variables, strings, lists, dictionaries and conditional statements are and how to use them

  • Some of the standard libraries and what they can do to help you

  • How to write your own functions

  • How to write your first Python program based on terminal Input and Output

  • How to use the Python Interactive Shell

  • How to use classes in your Python programs

Who this book is for

The Python Quick Syntax Reference is a great pocket reference guide for anyone wanting to program in Python, from the new user to the experienced programmer.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
  9. CHAPTER 1: Hello Python
    1. Python’s Interactive Shell
    2. The Code
    3. Decoding the Code
    4. Comments
  10. CHAPTER 2: Variables
    1. Case Sensitivity
    2. Proper Variable Naming
    3. Assignment
    4. Data Types
    5. Data Type Conversion
  11. CHAPTER 3: Operators
    1. Arithmetic Operators
    2. Comparison Operators
    3. Assignment Operators
    4. Logical Operators
    5. Membership and Identity Operators
    6. Bitwise Operators
    7. Precedence of Operators
  12. CHAPTER 4: Strings
    1. Appending to Srings
    2. String Functions
    3. String Methods
    4. Print Statement
    5. Python 2.x String Formatting
    6. Python 3.x String Formatting
  13. CHAPTER 5: Conditional Statements
    1. IF / ELIF / ELSE Statements
    2. For
    3. Break
    4. Continue
    5. Else
    6. Pass
    7. While
  14. CHAPTER 6: Data Structures
    1. Data Structure Example
    2. Digging Deeper
    3. Lists
    4. Dictionaries
    5. Tuples
    6. Sets
  15. CHAPTER 7: Keywords
    1. List of Python Keywords
    2. Keywords Explained
    3. Escape Sequences
  16. CHAPTER 8: Functions
    1. Structure of a Function
    2. Returning values
    3. Optional Parameters
    4. Variables in and out of Functions
    5. Anatomy of a Python Program
  17. CHAPTER 9: Libraries
    1. String Services
    2. Data Types
    3. Numeric and Mathematical Librarys
    4. File and Directory Access
    5. Data Persistance
    6. Data Compression and Archiving
    7. File Formats
    8. Cryptographic Services
    9. Generic Operating System Services
    10. Optional Operating system Services
    11. Interprocess Communication and Networking
    12. Internet Data Handling
    13. Structured Markup Processing Tools
    14. Internet Protocols and support
    15. Multimedia Services
    16. Internationalization
    17. Program Frameworks
    18. Graphical User Interfaces with Tk
    19. Development Tools
    20. Debugging and Profiling
    21. Python Runtime Services
    22. Custom Python Interpreters
    23. Importing Librarys
    24. Python Language Services
    25. MS Windows Specific Services
    26. Unix Specific Services
    27. Mac OS X
    28. MacPython OSA Librarys
    29. SGI IRIX Specific Services
    30. SunOS Specific Services
  18. CHAPTER 10: Classes
    1. What is an object?
    2. Creating a Class
    3. An Actual Example
    4. Something Real
  19. Index