摘要: 部分字符串用法 1 s.startswith() # 以xxxx开头 2 s.endswith() # 以xxxx结尾 3 s.split() #以某个字符分割字符串,并以列表的形式保存 4 isdigit # 是否是数字 5 replace 6、 find 7、center 8、strip 9、f 阅读全文
posted @ 2019-01-05 03:40 MarkaiElsa 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 深浅copy 浅拷贝是指把存放变量的地址值传给被赋值,最后两个变量引用了同一份地址 l1 = [1,2,3,[11,22,33]]l2 = l1.copy()print(l2) #[1,2,3,[11,22,33]]l2[3][2]='aaa'print(l1) #[1, 2, 3, [11, 22 阅读全文
posted @ 2019-01-05 02:21 MarkaiElsa 阅读(80) 评论(0) 推荐(0) 编辑