随笔分类 -  python

摘要:原文:https://blog.csdn.net/u010496169/article/details/70045895 u/U:表示unicode字符串 不是仅仅是针对中文, 可以针对任何的字符串,代表是对字符串进行unicode编码。 一般英文字符在使用各种编码下, 基本都可以正常解析, 所以一 阅读全文
posted @ 2019-07-20 11:57 水中飞云 阅读(155) 评论(0) 推荐(0)
摘要:4.6. and 和 or 的特殊性质 4.6. and 和 or 的特殊性质 4.6. and 和 or 的特殊性质 本文来源: http://www.ttlsa.com/docs/dive-into-python/html/power_of_introspection/and_or.html 在 阅读全文
posted @ 2019-07-17 22:19 水中飞云 阅读(116) 评论(0) 推荐(0)
摘要:migrate报错[ value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.] 在migrate时报错,检查models.py 无错误,删除数据库重新创建也无法解决。 解决方法: 删除 阅读全文
posted @ 2019-05-06 19:27 水中飞云 阅读(2225) 评论(0) 推荐(0)
摘要:1。f.string字符串 它的學名叫作 “Literal String Interpolation”。用法如下: 还可以: 2,exit 和finally 输出 3, None, False, 空字符串"", 0, 空列表[], 空字典{}, 空元组()都相当于False 阅读全文
posted @ 2019-04-23 20:20 水中飞云 阅读(90) 评论(0) 推荐(0)
摘要:1。默认数据库sqlite3 命令行打开数据库文件,进入文件目录,sqlite3 database.db 更新创建表: 在apps中编写models.py类,在settings.py文件中的“INSTALLED_APPS”要先加入自己的APP应用,告诉Django有这个应用 生成数据库表语句 数据库 阅读全文
posted @ 2019-04-02 22:40 水中飞云 阅读(102) 评论(0) 推荐(0)
摘要:“Unicode Error ”unicodeescape" codec can't decode bytes… Cannot open text files in Python 3 问题于字符串 "C:\Users\Eric\Desktop\beeline.txt" 在这里,\U启动一个八字符的U 阅读全文
posted @ 2019-02-27 14:18 水中飞云 阅读(140) 评论(0) 推荐(0)