摘要: lst_1 = [3,1,2] lst_2 = [4,6,5] print(lst_1.sort()) lst_1.sort() print(lst_1) print(sorted(lst_2)) #None #[1, 2, 3] #[4, 5, 6] 所以结论就是: sorted(list)原来的 阅读全文
posted @ 2023-08-10 17:14 你说夕阳很美 阅读(32) 评论(0) 推荐(0)
摘要: 简单理解就是: __dict__:是一个kv的字典类型,也就是属性和值。貌似高级用法是可以往里面加属性。 dir:是一个列表,所以只有属性。 什么继承,父类,这个那个细节看 python中__dict__与dir()的区别 - tlz888 - 博客园 (cnblogs.com) python 中d 阅读全文
posted @ 2023-08-10 16:54 你说夕阳很美 阅读(49) 评论(0) 推荐(0)
摘要: UnicodeDecodeError 'ascii' codec can't decode byte 0xe4 in position 0 ordinal not in range 128 其实就是加个:client_encoding配置 #1、直接使用 psycopg2 def __init__( 阅读全文
posted @ 2023-08-10 16:22 你说夕阳很美 阅读(263) 评论(0) 推荐(0)