import time
def logger():
"""追加写"""
time_format='%Y-%m-%d %X'#年-月-日 小时分钟秒
time_current=time.strftime(time_format)
with open('uuu.txt','a+') as f:
f.write('%s end action\n'%time_current) def fun1():
"""描述函数1功能"""
print('in the fun1')
logger()
def fun2():
"""描述函数2功能"""
print('in the fun2')
logger() fun1()
fun2()
"""
使用函数的三大优点:
1.代码重用
2.保持一致性
3.可扩展性
"""

  

最新文章

  1. cmd命令行提示符
  2. 【Win10 UWP】后台任务与动态磁贴
  3. ios界面布局整理
  4. hdu3572 最大流
  5. 5.3 Static
  6. Android-NDK编译:cocos2d-x(三) eclipse 导入工程
  7. 转-android 支付宝SDK集成
  8. POJ 1273 || HDU 1532 Drainage Ditches (最大流模型)
  9. 大白书 209 remember the word
  10. bzoj 1560 [JSOI2009]火星藏宝图(DP)
  11. 弹出层 div dialog
  12. 开源免费的C/C++网络库(c/c++ sockets library)补充
  13. .NET获取客户端的操作系统、IP地址、浏览器版本
  14. LNMP搭建03 -- 编译安装PHP
  15. Kafka如何删除topic?
  16. 四、UI开发之核心基础——约束(实用)
  17. glibc源码下载
  18. 安卓开发笔记——关于Handler的一些总结(上)
  19. Laravel Nginx 站点配置文件(Homestead)
  20. spring—Bean配置

热门文章

  1. bzoj4514: [Sdoi2016]数字配对(费用流)
  2. 毕马威&阿里:通向智能制造的转型之路
  3. Leetcode初级算法(字符串篇)
  4. 牛客假日团队赛1 D.Promotion Counting
  5. Python----Anaconda + PyCharm + Python 开发环境搭建(使用pip,安装selenium,使用IDLE)
  6. jquery——属性操作、特殊效果
  7. Docker 镜像制作 CentOS+JDK+Tomcat
  8. jdbc 开启事务
  9. 在myecplise中更新代码发布后没效果
  10. Oracle权限管理