- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Python University of WashingtonPython 华盛顿大学
Python A Crash Course Python? No compile of link steps No type declarations Automatic memory management High-level datatypes and operation Object-oriented programming Embedding and extending in C/C++ Classes, modules, exceptions A simple, clear syntax and design Universal “first-class” object model Interactive , dynamic nature Access to interpreter information Wide interpreter portability Large collection of libraries tools System calls What does it look like? Calculator Basics Dictionaries Tuples Functions Modules Files Exceptions Classes Boost.python Jython References Isn’t that a snake? Yes, but it is also a ... ... general-purpose open source computer programming language, optimized for quality, productivity, portability, and integration. It is used by hundreds of thousands of developers around the world, in areas such as Internet scripting, systems programming, user interfaces, product customization, and more. From Programming Python 2nd Ed. foo = 10 bar = “foo” foo2, bar2 = foo, bar if x 5 or (x 10 and x 20): print The value is OK. if x 5 or 10 x 20: print The value is OK. for i in [1,2,3,4,5]: print This is iteration number, i for j in range(5): print “This is iteration number”, j+1 x = 10 while x = 0: print x is still not negative. x = x-1 Numbers x,y = 10, 5 z = x + y x,y = 10.2, 4.8 z = x + y x = 10.2 + 4.8j y = complex(10,4) z = x.real a = y.imag s = “spam” + “eggs” varSpam = s[0:4] “”” spam eggs ””” u“spam eggs” #unicode d = r‘spam eggs’ #raw l = len(d) Strings Lists a = [spam, eggs, 100, 1234] a [spam, eggs, 100, 1234] a[0] spam a[3] 1234 a[-2] 100 a[1:-1] [eggs, 100] a[:2] + [bacon, 2*2] [spam, eggs, bacon, 4] q = [2, 3] p = [1, q, 4] len(p) 3 p[1] [2, 3] p[1][0] 2 p[1].append(xtra) p [1, [2, 3, xtra], 4] q [2, 3, xtra] d2 = {‘spam’:2, ‘ham’:1, ‘eggs’:3}d2[‘ham’]2len(d2)3d2.has_key(‘spam’)1d2.keys()[‘spam’,’ham’,’eggs’]del d2[‘ham’]1len(d2)2 In Python false is [ ], 0, “”, Nonetrue is e
您可能关注的文档
- Programming Outdoor Distributed Embedded Systems室外分布式嵌入式系统.ppt
- Programming the RCX UW Courses Web Server编程的RCX注册课程的Web服务器.ppt
- Programming with Alice Swikis on coweb爱丽丝在coweb swikis编程.cc.ppt
- Programming with Scratch galaxy用划痕编程.cs.lamar.ppt
- Programming with Alice New Mexico MESA编程与爱丽丝新墨西哥梅萨.ppt
- Programming support for distributed clustercomputing规划支持分布式集群计算.ppt
- Progress Measures for Young Deaf HH Children青年聋人HH孩子进步的措施.ppt
- Programming support for distributed clustercomputing VU分布式集群计算似曾相识的编程支持.ppt
- Progress Report CDRP and Patient Navigator Grant 进度报告和病人给予CDRP导航仪.ppt
- PROGRESS IN RENAL CELL CARCINOMA Wikispaces在肾细胞癌的进展Wikispaces.ppt
- Q2 Review Draft NHBQ2审稿 NHB.ppt
- QCD and Nuclei Brookhaven National Laboratory量子色动力学和核布克海文国家实验室.ppt
- QBA In Germany Fall Interim 2009 University of 葡萄酒在德国下降中期2009大学.ppt
- QCOST质量成本.ppt
- QFeverCoxiella burnetii WeeblyQ热贝氏柯克斯体 Weebly.ppt
- QI Experience in San Diego California Department of 齐经验在圣迭戈加利福尼亚系.ppt
- QoS Guarantee in Wirless Network csQoS保证的无线网络 CS.tju.cn.ppt
- QoS Guarantee in Wirless Network SIGMOBILEQoS保证的无线网络sigmobile.ppt
- QIS workshop presentation slides PagesQIS车间幻灯片页面.ppt
- QoS Guarantee in Wirless Network Tianjin UniversityQoS保证的无线网络天津大学.ppt
最近下载
- 2025年中国人民抗日战争胜利80周年铭记历史吾辈自强主题党课PPT.pptx VIP
- 承台土方开挖施工方案.pdf VIP
- 人教版(2019)必修第一册 Unit 3 sports and fitness Reading for Writing 导学案(含答案).docx VIP
- 施工总体进度计划及保障措施.doc VIP
- 《四年级上册语文第四单元复习》课件.pptx VIP
- 重庆独立储能电站项目可行性研究报告.docx
- 《思想政治教育学原理》教学.ppt VIP
- 某楼盘项目首期开盘营销工作倒排计划.xlsx VIP
- 2022人教版四年级上册数学期中测试卷含答案(基础题).docx VIP
- 《尿石症的诊断和治疗(2025EAU指南)》解读PPT课件.pptx VIP
原创力文档


文档评论(0)