与python第一次亲密接触!
在网上搜集了很多资料和浏览了python的很多相关文章,它给我的总体感觉是在文本处理上的高效和语言的"人性化",
面举个例子来说明我为什么觉得"人性化":
1. Reason One : 长整型无长度限制,除了电脑硬件的限制
Although both lower case "l" and upper case "L" are allowed as suffix for long integers, it is strongly recommended to always use "L", since the letter "l" looks too much like the digit "1".
Plain integer literals that are above the largest representable plain integer (e.g., 2147483647 when using 32-bit arithmetic) are accepted as if they were long integers instead.
There is no limit for long integer literals apart from what can be stored in available memory.
Some examples of plain integer literals (first row) and long integer literals (second and third rows):
7 2147483647 0177
3L 79228162514264337593543950336L 0377L 0x100000000L
79228162514264337593543950336 0xdeadbeef
2. Reason Two : (quote)
一个python小tip,交换两个变量的值,而且不使用第三个变量:
>>> a,b = 1,2
>>> a,b = b,a
>>> a,b
(2, 1)
>>>
3.Reason Three:
它是用C语言开发的,但是效率比起C语言也差了多少,当然没C快啦,但是他里面的很多函数非常方便,功能比C强大很多。
4.Reason Four :
最让人兴奋的原因就是BitComet就是它开发出来的。
他避免了很多初学程序设计时常常出现的问题,尽管对于大多数人来说都是几乎不会发生的,但是从这点可以看出它对它的用户是傻瓜开始的。因为傻瓜才会犯哪些错误!