简明Python3教程 首页

A Byte of Python

'A Byte of Python' is a free book on programming using the Python language. It serves as a tutorial or guide to the Python language for a beginner audience. If all you know about computers is how to save text files, then this is the book for you.

This book is written for the latest Python 3, even though Python 2 is the commonly found version of Python today (read more about it in Python 2 versus 3 section).

Who Reads A Byte of Python?

Here are what people are saying about the book:

The best thing i found was "A Byte of Python", which is simply a brilliant book for a beginner. It's well written, the concepts are well explained with self evident examples.

-- Syed Talal (19 years old)

This is the best beginner's tutorial I've ever seen! Thank you for your effort.

-- Walt Michalik (wmich50-at-theramp-dot-net)

You've made the best Python tutorial I've found on the Net. Great work. Thanks!

-- Joshua Robin (joshrob-at-poczta-dot-onet-dot-pl)

Excellent gentle introduction to programming #Python for beginners

-- Shan Rajasekaran

Hi, I'm from Dominican Republic. My name is Pavel, recently I read your book 'A Byte of Python' and I consider it excellent!! :). I learnt much from all the examples. Your book is of great help for newbies like me...

-- Pavel Simo (pavel-dot-simo-at-gmail-dot-com)

I recently finished reading Byte of Python, and I thought I really ought to thank you. I was very sad to reach the final pages as I now have to go back to dull, tedious oreilly or etc. manuals for learning about python. Anyway, I really appreciate your book.

-- Samuel Young (sy-one-three-seven-at-gmail-dot-com)

Dear Swaroop, I am taking a class from an instructor that has no interest in teaching. We are using Learning Python, second edition, by O'Reilly. It is not a text for beginner without any programming knowledge, and an instructor that should be working in another field. Thank you very much for your book, without it I would be clueless about Python and programming. Thanks a million, you are able to 'break the message down' to a level that beginners can understand and not everyone can.

-- Joseph Duarte (jduarte1-at-cfl-dot-rr-dot-com)

I love your book! It is the greatest Python tutorial ever, and a very useful reference. Brilliant, a true masterpiece! Keep up the good work!

-- Chris-André Sommerseth

I'm just e-mailing you to thank you for writing Byte of Python online. I had been attempting Python for a few months prior to stumbling across your book, and although I made limited success with pyGame, I never completed a program.

Thanks to your simplification of the categories, Python actually seems a reachable goal. It seems like I have finally learned the foundations and I can continue into my real goal, game development.

...

Once again, thanks VERY much for placing such a structured and helpful guide to basic programming on the web. It shoved me into and out of OOP with an understanding where two text books had failed.

-- Matt Gallivan (m-underscore-gallivan12-at-hotmail-dot-com)

I would like to thank you for your book 'A byte of python' which i myself find the best way to learn python. I am a 15 year old i live in egypt my name is Ahmed. Python was my second programming language i learn visual basic 6 at school but didn't enjoy it, however i really enjoyed learning python. I made the addressbook program and i was sucessful. i will try to start make more programs and read python programs (if you could tell me source that would be helpful). I will also start on learning java and if you can tell me where to find a tutorial as good as yours for java that would help me a lot. Thanx.

-- Ahmed Mohammed (sedo-underscore-91-at-hotmail-dot-com)

A wonderful resource for beginners wanting to learn more about Python is the 110-page PDF tutorial A Byte of Python by Swaroop C H. It is well-written, easy to follow, and may be the best introduction to Python programming available.

-- Drew Ames in an article on Scripting Scribus published on Linux.com

Yesterday I got through most of Byte of Python on my Nokia N800 and it's the easiest and most concise introduction to Python I have yet encountered. Highly recommended as a starting point for learning Python.

-- Jason Delport on his weblog

Byte of Vim and Python by @swaroopch is by far the best works in technical writing to me. Excellent reads #FeelGoodFactor

-- Surendran says in a tweet

"Byte of python" best one by far man

(in response to the question "Can anyone suggest a good, inexpensive resource for learning the basics of Python? ")

-- Justin LoveTrue says in a Facebook community page

"The Book Byte of python was very helpful ..Thanks bigtime :)"

-- Chinmay

Always been a fan of A Byte of Python - made for both new and experienced programmers.

-- Patrick Harrington, in a StackOverflow answer

Even NASA
The book is even used by NASA! It is being used in their Jet Propulsion Laboratory with their Deep Space Network project.

Academic Courses

This book is/was being used as instructional material in various educational institutions:

License

This book is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.

This means:

  • You are free to Share i.e. to copy, distribute and transmit this book
  • You are free to Remix i.e. to adapt this book
  • You are free to use it for commercial purposes

Please note:

  • Please do not sell electronic or printed copies of the book unless you have clearly and prominently mentioned in the description that these are not from the original author of this book.
  • Attribution must be shown in the introductory description and front page of the document by linking back to http://www.swaroopch.com/notes/Python and clearly indicating that the original text can be fetched from this location.
  • All the code/scripts provided in this book is licensed under the 3-clause BSD License unless otherwise noted.

Read Now

You can read the book online.

Buy the Book

A printed hardcopy of the book can be purchased for your offline reading pleasure, and to support the continued development and improvement of this book.

Download

If you wish to support the continued development of this book, please consider buying a hardcopy.

Read the book in your native language

If you are interested in reading or contributing translations of this book to other human languages, please see the Translations page.

 

 

 

--------------Python书籍推荐-----------------

Python基础教程-第2版.修订版 

购买地址1  购买地址2

 

 

PYTHON核心编程

购买地址1  购买地址2

 

 

零基础学Python

购买地址1  购买地址2

时间: 2024-10-22 17:07:26

简明Python3教程 首页的相关文章

简明Python3教程(A Byte of Python 3)

 关键字:[A Byte of Python v1.92(for Python 3.0)] [A Byte of Python3] 简明Python教程 Python教程 简明Python3教程    简明Python3教程<A Byte of Python3>是一本关于用Python3语言编程的书.可以作为初学这的入门教程.也可以供计算机相关人员参考. 本书可作为Python编程语言的指导或辅导.主要是针对新手的,当然,对于有经验的程序员也很有用.如果你所了解的计算机的知识就是如何保存文本文

简明Python3教程 5.第一步

介绍 我们现在来看看如何在Python中运行传统的"Hello world"程序.这会教你如何写.保存以及运行Python程序. 有两种办法来运行您的Python程序--使用交互式的解释器提示符或者源代码文件.我们现在来分别看一看这两种方法. 使用解释器提示符 在命令提示符中输入python来打开解释器. 那些在GNU/Linux与BSD上同时安装了Python 3.x与Python 2.x的用户可能需要输入python3. 而对于Windows用户而言,如果您在PATH环境变量里正确

简明Python3教程 6.基础

你肯定不满足于只打印"Hello World"吧? 你想要的更多 - 你希望得到一些输入,操纵它后再从中得到某些东西.我们可以使用python中的常量和变量实现这些功能.   字面常量(literal constant)字面常量的一个例子是数字诸如5, 1.23, 9.25e-3或字符串This is a string', "It's a string!".顾名思义,字面常量的重点在于"字面", 你直接以字面的意义使用它们.数字2永远是数字2绝不

简明Python3教程 4.安装

如果你已经安装了Python 2.x,你不需要在安装Python 3.0前卸载Python 2.x.这两者可以共存. GNU/Linux用户和BSD用户 如果你使用类似于Ubuntu.Fedora.OpenSUSE.Debian.CentOS或其他你选择的GNU/Linux发行版,或类似于FreeBSD的BSD系统,你的系统很可能已经了Python. 可通过开启shell程序(如konsole或gnome-terminal)并输入以下命令以检测Python是否安装在你的BSD或GNU/Linux

简明Python3教程 16.标准库

简介 python标准库作为python标准安装的一部分,其自身包含数量庞大的实用模块, 因此熟悉python标准库非常重要,因为很多问题都能利用python标准库快速解决. 下面我们将研究标准库中的一些常用模块.完整的标准库模块列表可以在安装python时附带的文档中的'Library Reference'一节找到. 现在就让我们来看看这些模块吧.   提示 如果你感觉本章内容对于你过于超前,那么可以跳过本章.但是当你熟悉python编程后我强烈建议你把这章补上.   sys模块 sys模块包

简明Python3教程 9.函数

简介 函数是程序的可复用片段,允许你为语句块赋予名字之后在程序的任何地方运行它们任意次,这称做函数调用. 我们已经使用过一些内建函数,例如len和range等. 函数也许是任何有意义的软件中最重要的构件,所以我们将在本章探究函数的方方面面. 函数以关键字def定义,其后紧跟函数名,由一对小括号闭合的形参,最后以冒号结束定义行, 定义行下面的是函数体,它是一个语句块. 听着有点复杂,其实定义起来是很简单的,见下面的例子: 范例: #!/usr/bin/python # Filename: func

简明Python3教程 2.序言

Python也许是为数不多的既简单又强大的编程语言.这有利于新手甚至于专家,更重要的是用它编程所带来的乐趣. 这本书的目的是帮助您了解这种神奇的语言,展示如何快速而轻松地完成事情--事实上"编程问题的完美解决方案!" 本书的读者 本书可以作为Python编程语言的一本指南或者教程.它主要是为新手而设计,不过对于有经验的程序员来说,它同样有用. 其目的是,即使你对计算机的认识只是知道如何保存文件,你仍然可以从本书中学到的Python.如果你之前有过编程经验,你也可以从本书中学到的Pyth

简明Python3教程 14.输入输出

简介 一些情况下你不得不让程序与用户进行交互.例如,你需要从用户处得到输入然后输出计算结果.我们可以分别通过input()和print()函数做到这些. 对于输出,我们还可以使用str(string)类的各种方法.例如rjust方法可以得到一个指定宽度的右对齐字符串.详见help(str). 另一种常见的输入/输出类型为文件处理.对于很多程序拥有创建,读写文件的能力是必不可少的,我们会在这节探究这些内容.   得到用户输入 #!/usr/bin/python # user_input.py de

简明Python3教程 15.异常

简介 当程序发生意外情况时则产生异常. 例如你需要读一个文件而这个文件并不存在会咋样?又或者是程序运行时你把它误删除了呢? 上述情形通过异常进行处理. 类似的,如果你的程序存在一些非法语句会发生什么呢?这时python会举手告诉你存在一个错误.   错误 考虑一个简单的print函数调用.如果我们把print错拼成Print(注意大小写),这时python将引发一个语法错误.     >>> Print('Hello World')     Traceback (most recent