摘要: Project Overview:This purpose of this project is to write the contents of a csv file to an html file in the form of a table. The first row of the csv file is assumed to be a header row. The table will have predefined css styles applied to it. The styles will customize the header as well as alternate 阅读全文
posted @ 2013-04-07 21:52 Me.thinking 阅读(1115) 评论(0) 推荐(0) 编辑
摘要: 在 Python 中, 当需要对一个 list 排序时, 一般可以用 list.sort() 或者 sorted(iterable[, cmp[, key[, reverse]]]).其中:cmp(e1, e2) 是带两个参数的比较函数, 返回值: 负数: e1 < e2, 0: e1 == e2, 正数: e1 > e2. 默认为 None, 即用内建的比较函数.key 是带一个参数的函数, 用来为每个元素提取比较值. 默认为 None, 即直接比较每个元素.reverse 是一个布尔值, 表示是否反转比较结果.我以前在做比较复杂的排序时, 喜欢写一个定制的 cmp 函数. 当我 阅读全文
posted @ 2013-04-07 12:43 Me.thinking 阅读(277) 评论(0) 推荐(0) 编辑