- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 perl 中hash表的清空操作
刚在写perl代码的时候, 突然发现写出的代码在hash统计值的时候有重复现象, 通过查代码, 发现是因为第一次统计完后, 没有清空已有的hash, 导致出现前面的情况. 以下说明一下hash的清空方式: %hash=();
2011-11-01 17:07:48
9569
原创 注意python中的引用
shoplist['apple','mango','carrot','banana']mylist=shoplist #这里是引用,当shoplist改变时,mylist也跟着改变,因为他们指向的是同一片内存。del shoplist[0]print 'shoplist is ',shoplistprint 'mylist is ',mylist打出来的内容都是一样的。当你创建
2011-10-31 08:53:21
390
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人