首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Python 2.7.x 和 3.x 版

python现在很火,最近花了些时间去了解了一下,最初了解的是2.7.x版本,感觉,从书写上是很不习惯,少了一双大概号,取而代之的是缩进;然后跟kotlin和swift一样省去了每行的分号,象我们这种分号强迫症的人真心的不习惯;还有!True的条件改成not True、while后面可以跟else等等这些,真心不习惯啊!用2.7.x做了几天的测试,基本慢慢算有个了解了,也试着爬了些行业网的数据,感觉这个比PHP写爬虫方便很多。然后昨晚就在家里装了个3.X的版本,很悲催的发现,原来写的有很多的错误,万般无奈的检查之下,发现语句上是没什么问题,只是3.X版本不兼容部分的语句,例如最常用的print,raw_input都不一样了,今天花了些时间查一查,并总结了一下它们的区别。

03
您找到你想要的搜索结果了吗?
是的
没有找到

177本Python最新版国外电子书分享(上)

http://file.allitebooks.com/20180817/Python For Dummies.pdf http://file.allitebooks.com/20180805/MySQL ConnectorPython Revealed.pdf http://file.allitebooks.com/20180722/Learn Raspberry Pi Programming with Python, 2nd Edition.pdf http://file.allitebooks.com/20180719/Instant Pygame for Python Game Development How-to.pdf http://file.allitebooks.com/20180623/Python Graphics.pdf http://file.allitebooks.com/20180603/Web Scraping with Python, 2nd Edition.pdf http://file.allitebooks.com/20180526/Advanced Data Analytics Using Python.pdf http://file.allitebooks.com/20180513/The Python 3 Standard Library by Example.pdf http://file.allitebooks.com/20180512/Data Science Fundamentals for Python and MongoDB.pdf http://file.allitebooks.com/20180312/Dive into Python 3.pdf http://file.allitebooks.com/20180228/Practical Python AI Projects.pdf http://file.allitebooks.com/20180223/Learn Data Analysis with Python.pdf http://file.allitebooks.com/20180218/Beginning Programming with Python For Dummies, 2nd Edition.pdf http://file.allitebooks.com/20180109/Python for the Busy Java Developer.pdf http://file.allitebooks.com/20171221/Practical Machine Learning with Python.pdf http://file.allitebooks.com/20171213/wxPython Recipes.pdf http://file.allitebooks.com/20171126/MicroPython for the Internet of Things.pdf http://file.allitebooks.com/20171124/Make Your Own Python Text Adventure.pdf http://file.allitebooks.com/20171108/Getting Started with Python and Raspberry Pi.pdf http://file.allitebooks.com/20171029/Python Machine Learning Case Studies.pdf http://file.allitebooks.com/20171009/Python for Data Analysis, 2nd Edition.pdf http://file.allitebooks.com/20171009/Programming with MicroPython.pdf http://file.allitebooks.com/20170831/Thoughtful Machine Learning with Python.pdf http://file.allitebooks.com/20170822/Test-Driven Development with Python, 2nd Edition.pdf http://file.allitebooks.com/20170813/Python Requests Essentials.pdf http://file.allitebooks.com/20170710/Effective Python Penetration

02

100 个基本 Python 面试问题第四部分(61-80)

Q-1:什么是 Python,使用它有什么好处,你对 PEP 8 有什么理解? Q-2:以下 Python 代码片段的输出是什么?证明你的答案。 Q-3:如果程序不需要动作但在语法上需要它,可以在 Python 中使用的语句是什么? Q-4:在 Python 中使用“~”获取主目录的过程是什么? Q-5:Python 中可用的内置类型有哪些? Q-6:如何在 Python 应用程序中查找错误或执行静态分析? Q-7:什么时候使用 Python 装饰器? Q-8:列表和元组的主要区别是什么? Q-9:Python 如何处理内存管理? Q-10:lambda 和 def 之间的主要区别是什么? Q-11:使用 python reg 表达式模块“re”编写一个 reg 表达式来验证电子邮件 ID? Q-12:你认为以下代码片段的输出是什么?代码中有错误吗? Q-13:Python 中有 switch 或 case 语句吗?如果不是,那么相同的原因是什么? Q-14:Python 用来迭代数字序列的内置函数是什么? Q-15:Python 的 try-except 块中可能有哪些可选语句? Q-16:Python 中的字符串是什么? Q-17:Python 中的切片是什么? Q-18:Python 中的 %s 是什么? Q-19:字符串在 Python 中是不可变的还是可变的? Q-20:Python 中的索引是什么? Q-21:Python 中的文档字符串是什么? Q-22:Python 编程中的函数是什么? Q-23:Python 中有多少基本类型的函数? Q-24:我们如何用 Python 编写函数? Q-25:Python 中的函数调用或可调用对象是什么? Q-26:Python 中的 return 关键字是做什么用的? Q-27:Python 中的“按值调用”是什么? Q-28:Python 中的“按引用调用”是什么? Q-29:trunc() 函数的返回值是多少? Q-30:Python 函数必须返回一个值吗? Q-31:Python 中的 continue 有什么作用? Q-32:Python 中 id() 函数的用途是什么? Q-33:*args 在 Python 中有什么作用? Q-34:**kwargs 在 Python 中做什么? Q-35:Python 有 Main() 方法吗? Q-36: __ Name __ 在 Python 中有什么作用? Q-37:Python 中“end”的目的是什么? Q-38:什么时候应该在 Python 中使用“break”? Q-39:Python 中的 pass 和 continue 有什么区别? Q-40:len() 函数在 Python 中有什么作用? Q-41:chr() 函数在 Python 中有什么作用? Q-42:ord() 函数在 Python 中有什么作用? Q-43:Python 中的 Rstrip() 是什么? Q-44:Python 中的空格是什么? Q-45:Python 中的 isalpha() 是什么? Q-46:你如何在 Python 中使用 split() 函数? Q-47:Python 中的 join 方法有什么作用? Q-48:Title() 方法在 Python 中有什么作用? Q-49:是什么让 CPython 与 Python 不同? Q-50:哪个包是最快的 Python 形式? Q-51:Python 语言中的 GIL 是什么? Q-52:Python 如何实现线程安全? Q-53:Python 如何管理内存? Q-54:Python 中的元组是什么? Q-55:Python 编程中的字典是什么? Q-56:Python 中的 set 对象是什么? Q-57:字典在 Python 中有什么用? Q-58:Python 列表是链表吗? Q-59:Python 中的 Class 是什么? Q-60:Python 类中的属性和方法是什么? Q-61:如何在运行时为 Class 属性赋值? Q-62:Python 编程中的继承是什么? Q-63:Python 中的组合是什么? Q-64:Python 程序中的错误和异常是什么? Q-65:你如何在 Python 中使用 Try/Except/Finally 处理异常? Q-66:你如何为 Python 中的预定义条件引发异常? Q-67:什么是 Python 迭代器? Q-68:Iterator 和 Iterable 有什么区别? Q-69:什么是 Python 生成器? Q-70:Python 中的闭包是什么? Q-71:Python 中的装

02
领券