摘要:
代码: >>> from collections import Iterator,Iterable >>> >>> >>> from collections import Iterator,Iterable >>> l = [1,2,3,4,5] >>> for x in l: ... print( 阅读全文
摘要:
需求: 某文件系统目录下有一系列文件: quickshort.c graph.py heap.java install.sh stack.cpp ... 编写程序给其中的所有.py和.sh结尾的文件加上用户可执行权限 思路: 使用str.startswith()和str.endswith()方法 ( 阅读全文