易截截图软件、单文件、免安装、纯绿色、仅160KB

Python 基础 1

1.解释性 可以直接从源代码运行程序.在计算机内部,Python解释器把源代码转换成称为字节码的中间形式,然后再把它翻译成计算机使用的机器语言并运行.
2.#符号后面的内容都是注释.
3.在字符串中行末的'\'表示下一行的内容和上一行是接着的;字符串前加一个r表示某些不需要转义符那样的特别处理的字符串;在处理文本文件的时候使用 Unicode字符串,特别是这个文件中包含有用非英语的语言写的文本;一定要用自然字符串表示正则表达式,不包括 char这个类型.
4.基本的数据类型包括数和字符串.数的类型包括:四类, 整数,长整数,浮点数和复数.
5.使用变量时,只需赋值给他们即可.
6.在逻辑行首的空白用来决定逻辑行的缩进层次,从而用来决定语句的分组.
7.运算符:'a'+'b'='ab','la'*3='lalala',3**4表示3的4次幂,//:取整除,%:取模,大于小于号可以任意连接,==比较对象是否相等,not 表示布尔非,and 布尔与,or 布尔或


相关文档:

[Python module] select

16.1. select — Waiting for I/O completion¶
This module provides access to the select and poll functions available in most operating systems, epoll available on Linux 2.5+ and kqueue available on most BSD. Note that on Windows, it only works for sockets; on other operating systems, it al ......

[Python module] queue

8.8. queue — A synchronized queue class¶
queue -- 一个同步队列类
The queue module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be exchanged safely between multiple threads. The Queue class in this module implemen ......

[Python module] threading

threading — Higher-level threading interface
This module constructs higher-level threading interfaces on top of the lower level _thread module. See also the queue module.
The dummy_threading module is provided for situations where threading cannot be used because _thread is missing.
  ......

[Python module] multiprocessing


multiprocessing — Process-based “threading” interface
Introduction
multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Glo ......

Python 3 初探,第 1 部分: Python 3 的新特性

Python 3 是 Guido van Rossum 功能强大的通用编程语言的最新版本。它虽然打破了与 2.x 版本的向后兼容性,但却清理了某些语法方面的问题。本文是系列文章中的第一篇,介绍了影响该语言及向后兼容性的各种变化,并且还提供了新特性的几个例子。
Python 版本 3,也被称为 Python 3000 或 Py3K(仿效 Microsoft® Windows ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号