![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
HZ514
这个作者很懒,什么都没留下…
展开
-
datetime模块的strptime()和strftime
python中时间日期格式化符号%y 两位数的年份表示(00-99)%Y 四位数的年份表示(000-9999)%m 月份(01-12)%d 月内中的一天(0-31)%H 24小时制小时数(0-23)%I 12小时制小时数(01-12)%M 分钟数(00=59)%S 秒(00-59)%a 本地简化星期名称%A 本地完整星期名称%b 本地简化的月份名称%B 本地完整的月份名...原创 2018-09-05 21:31:05 · 13533 阅读 · 0 评论 -
python、Django、Flask返回json数据
pyhton中在Python中我们可以采用标准库(json)进行格式转换:1、将数据转换成josnimport jsondef root(): t = { 'a': 1, 'b': 2, 'c': [3, 4, 5] } return json.dumps(t)此时在访问时就能得到json数据2、上面虽然正...原创 2018-09-05 21:30:25 · 1168 阅读 · 0 评论