Python 第11页
Python frozenset 集合-猿说编程

Python frozenset 集合

Python frozenset 集合 - 如果尝试修改 frozenset 集合的数据,即使用 add 添加数据,程序报错:AttributeError: ‘frozenset’ object has no attribute ‘add’!与 Python set 集合区别在于 ...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
017552
Python 线程障碍对象 Barrier-猿说编程

Python 线程障碍对象 Barrier

Python 线程障碍对象 Barrier - Python 线程 Barrier 俗称障碍对象,也称栅栏,也叫屏障。 与之前介绍 互斥锁 Lock / 事件 Event / 定时器 Timer 等不同,多线程 Barrier 会设置一个线程障碍数...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
017832
Python callable 函数-猿说编程

Python callable 函数

Python callable 函数 - Python内置函数 callable 用于检查一个对象是否是可调用的,如果函数返回True,object 仍然可能调用失败;但如果返回 False,调用对象 object 绝对不会成功。 ''' 参数...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
015091
Python next 函数-猿说编程

Python next 函数

Python next 函数 - Python 3.x 内置函数 next 可以从迭代器中检索下一个元素或者数据,可以用于迭代器遍历,使用的时候注意会触发 StopIteration 异常! 1.没有设置 default 参数,使用 next ...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
020181
Python enumerate 函数-猿说编程

Python enumerate 函数

python enumerate 函数 - ''' 参数介绍: iterable — 可迭代对象(列表、元祖、字典、迭代器、字符串等); start — 索引序列的起始值,默认重0开始; 返回值:同时返回元素下标和对应的元素...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
010281
Python 字符串-猿说编程

Python 字符串

二.Python字符串运算符 三.字符串构造 四.字符串截取 五.字符串替换 – replace()方法 六.字符串大小写 字符串中的每一个字符都有一个默认的索引值,从左到右默认重0开始,依次递增;从右往左默...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
028871
Python  进程 Process 与线程 threading 区别-猿说编程

Python 进程 Process 与线程 threading 区别

Python 进程 Process 与线程 threading 区别 - 1.一个线程只能属于一个进程,而一个进程可以有多个线程,但至少有一个线程(线程是计算机的最小单位); 2.资源分配给进程,同一进程的所有线程...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
030451
Python super 函数-猿说编程

Python super 函数

Python super 函数 - Python 内置函数 super 主要用于类的多继承中,用来查找并调用父类的方法,所以在单重继承中用不用 super 都没关系;但是,使用 super 是一个好的习惯。一般我们在子类中需...
猿说编程的头像-猿说编程钻石会员猿说编程4年前
011921
Python chr / ord 函数区别和使用-猿说编程

Python chr / ord 函数区别和使用

Python chr/ord函数区别和使用 - Python 中 内置函数 chr 和 内置函数 ord 可以配对使用;chr 函数将 ascll 码转为字符;ord 函数将字符转为 ascll 码;
Python reload 函数-猿说编程

Python reload 函数

Python reload 函数 - 在 Python2.x 中 reload 函数是 Python 的内置函数; 在 Python3.x 中 reload 函数需要导入 imp 第三方库才能使用;
猿说编程的头像-猿说编程钻石会员猿说编程4年前
014531