摘要: 集合:{} 无序的 增: add() update("alex") 迭代增加 删: pop() 随机删除 clear() 清空 del 删除整个集合 remove 通过元素指定删除 改 set={1,2,3,4} s=set.remove(3) s=set.add(7) print(set) 查: for 循环 集合天然去重复 & 交集 intersect... 阅读全文
posted @ 2018-10-30 17:04 Stone李 阅读(236) 评论(0) 推荐(0)
摘要: 文件操作: r 读 w 写 只能覆盖写,先清空后写入 a 在文件文本末尾追加 r+ 读写 必须先读 w+ 写读 a+追加写读 b 使用吧的时候不能写编码集,b操作的是字节 rb 读取非文本文件 wb 可以不指定打开文件编码,但是写文件的时必须将字符串转化utf-8的bytes数据 ab 字节不能添加 阅读全文
posted @ 2018-10-30 16:44 Stone李 阅读(110) 评论(0) 推荐(0)
var a_idx = 0; jQuery(document).ready(function($) { $("body").click(function(e) { var a = new Array("","","","","","","♪","",""); var $i = $("").text(a[a_idx]); a_idx = (a_idx + 1) % a.length; var x = e.pageX, y = e.pageY; $i.css({ "z-index": 999999999999999999999999999999999999999999999999999999999999999999999, "top": y - 20, "left": x, "position": "absolute", "font-weight": "bold", "color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")" }); $("body").append($i); $i.animate({ "top": y - 180, "opacity": 0 }, 1500, function() { $i.remove(); }); }); });