Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
Guixing Bai
474 views
Python简单介绍
AI-enhanced description
文档提供了Python的简介,包括其特点、功能、内建函数和模块。还详细介绍了Python 3的风格和模块变化,并附上了参考资料链接。总体上,内容适合对Python感兴趣的初学者和开发者。
Technology
◦
Read more
4
Save
Share
Embed
Embed presentation
Download
Downloaded 24 times
1
/ 42
2
/ 42
3
/ 42
4
/ 42
5
/ 42
6
/ 42
7
/ 42
8
/ 42
9
/ 42
10
/ 42
11
/ 42
12
/ 42
13
/ 42
14
/ 42
15
/ 42
16
/ 42
17
/ 42
18
/ 42
19
/ 42
20
/ 42
21
/ 42
22
/ 42
23
/ 42
24
/ 42
25
/ 42
26
/ 42
27
/ 42
28
/ 42
29
/ 42
30
/ 42
31
/ 42
32
/ 42
33
/ 42
34
/ 42
35
/ 42
36
/ 42
37
/ 42
38
/ 42
39
/ 42
40
/ 42
41
/ 42
42
/ 42
More Related Content
PPTX
Virtual function-introduce
by
Rafael Chen
PPTX
Vim 神技
by
hotoo
PDF
Python speed up with numba
by
Jiang Wu
PDF
Polar example
by
Alisha Smile
PDF
Data-Driven Operations - Practice realtime data analyse
by
Guixing Bai
PDF
Python and sysadmin I
by
Guixing Bai
PDF
Python for Linux System Administration
by
vceder
ODP
Programming Under Linux In Python
by
Marwan Osman
Virtual function-introduce
by
Rafael Chen
Vim 神技
by
hotoo
Python speed up with numba
by
Jiang Wu
Polar example
by
Alisha Smile
Data-Driven Operations - Practice realtime data analyse
by
Guixing Bai
Python and sysadmin I
by
Guixing Bai
Python for Linux System Administration
by
vceder
Programming Under Linux In Python
by
Marwan Osman
Similar to Python简单介绍
PDF
Python简明教程
by
ingong
PDF
简单Pthon教程
by
junjun chen
PPT
Python 脚本入门基础
by
wklken
PDF
Python核心编程(中文 第二版)
by
yiditushe
PDF
Adorable python
by
Rhythm Sun
PPT
chapter 1 basic knowledge about python.ppt
by
qianruizhan
PPT
Python 入门
by
kuco945
PPTX
02.python基础
by
modou li
PPTX
Pythonic
by
small fish
PDF
Python速成指南
by
March Liu
PPTX
Python入门
by
fengxing
PPTX
01.python介绍
by
modou li
PPT
Python story
by
small fish
PPTX
One hour to learn python and learn it well
by
airmansix
PDF
A brief introduction to Python
by
bugway
PDF
Python beginner tutorial
by
cri fan
PDF
Learning python in the motion picture industry by will zhou
by
Will Zhou
PDF
Learn python 1
by
Chia-Hao Tsai
PPT
Django敏捷开发 刘天斯
by
liuts
PDF
Python 温故
by
勇浩 赖
Python简明教程
by
ingong
简单Pthon教程
by
junjun chen
Python 脚本入门基础
by
wklken
Python核心编程(中文 第二版)
by
yiditushe
Adorable python
by
Rhythm Sun
chapter 1 basic knowledge about python.ppt
by
qianruizhan
Python 入门
by
kuco945
02.python基础
by
modou li
Pythonic
by
small fish
Python速成指南
by
March Liu
Python入门
by
fengxing
01.python介绍
by
modou li
Python story
by
small fish
One hour to learn python and learn it well
by
airmansix
A brief introduction to Python
by
bugway
Python beginner tutorial
by
cri fan
Learning python in the motion picture industry by will zhou
by
Will Zhou
Learn python 1
by
Chia-Hao Tsai
Django敏捷开发 刘天斯
by
liuts
Python 温故
by
勇浩 赖
Python简单介绍
1.
Python 简单介绍 Guixing Bai guixing@staff.sina.com.cn 1
2.
特点 2
3.
简单易学 3
4.
功能强大 4
5.
兼容性好 5
6.
扩展性好 6
7.
开源 7
8.
例子 8
9.
好工具 iPython 9
10.
内建函数 build-in 10
11.
print 11
12.
open, range, lambda 12
13.
map, filter 13
14.
模块 14
15.
sys,os 15
16.
time, datetime 16
17.
hashlib 17
18.
Tips 18
19.
[i for i
in lst if i] 19
20.
[i.strip() for i
in lst if i] 20
21.
def fun(arg1,arg2) d={arg1:11,arg2:22} fun(d[arg1],d[arg2]) fun(**d) 21
22.
p = [a,b,c] #want
a/b/c os.path.join(*p) 22
23.
a=[a,b,c] #want a_b_c or
a*b*c ’_’.join(a) ’*’.join(a) b=’fuck’ #want fuck! fuck!... ”%s! ” % (b) * 20 23
24.
源代码 style guide 24
25.
tab,space 25
26.
def fun(): tab>a=xx ....return a 26
27.
好 4个space 27
28.
#!/usr/bin/env python # coding=utf-8 #
-*- coding: utf-8 -*- 28
29.
#NO import os,sys #Yes import os import
sys #But from os import popen,popen2 29
30.
#Yes a = 1
+ 2 blockq = 3 + 4 #No a = 1 + 2 blockq = 3 + 4 30
31.
1行不超79 etc. 31
32.
Py3k has come 32
33.
Style Changes 33
34.
4-space ONLY 34
35.
• None, as
成了关键字 • print 成了函数 • dict.has_key 改用in操作符 • int和long没有差别了 • 所有的strings都是Unicode • 不可比的类型之间比较将出异常 • <>操作符没有了,!=代替 • apply()用f(*args,**kw)代替 • xrange()用rang()代替 • map和filter没有了,list可以管 • etc. 35
36.
Module Changes 36
37.
• Removed • sha,md5:
hashlib代替 • mimetools: email package代替 • timing: time.clock()代替 • Renamed • cPickle: _pickle • StringIO/cStringIO: 成了io的一个class • HTMLParser: http.client • BaseHTTPServer: http.server • CGIHTTPServer: http.server • SimpleHTTPServer: http.server 37
38.
路漫漫其 修远兮! 38
39.
Q&A? 39
40.
参考资料 • PEP: http://www.python.org/dev/peps/ •
8: Style Guide for Python Code • 3000: Python 3000 • 263: Defining Python Source Code Encodings • Py3k: http://wiki.python.org/moin/ Python3.0 • Python Shell Tab Completion: http:// blog.yzlin.org/2008/12/22/75/ 40
41.
• iPython: http://ipython.scipy.org/moin/ •
python常用模块: http:// wiki.woodpecker.org.cn/moin/ PyCommonUsageMod • python中文处理: http:// wiki.woodpecker.org.cn/moin/PyInChinese • Python编辑速度技巧: http:// wiki.woodpecker.org.cn/moin/PyOptimize • vim的tabstop: http://blog.khsing.net/ 2008/12/vims-tabstop.html 41
42.
Thanks! 42
Download