- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 python简明教程 “Rise to vote, sir.”的回文识别
书中没有给出代码,此次练习的代码如下,利用re.sub进行字符的替换import redef reverse(text): return text[::-1]def is_palindrome(text): return text == reverse(text)something = input("Enter text: ")str = re.sub('[., ]','',some
2018-02-01 22:00:19
650
1
原创 简明python教程中用zipfile模块进行备份
简明python教程中,用zipfile模块进行备份的部分,书中并没有留下代码,代码如下:import osimport timeimport zipfile# 1. 需要备份的文件与目录将被# 指定在一个列表中。# 例如在 Windows 下:source = ['D:\\编程练习\\Python_new']# 又例如在 Mac OS X 与 Linux 下:# source
2018-01-31 17:28:59
348
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人