摘要:
Python预置的list.sort()、sorted()方法可实现各种数组的排序,但支持的只限于一个key,如果要多重排序,目前所知的方法只有自定义了。 Help on built-in function sorted in module __builtin__: sorted(...) sort 阅读全文
摘要:
doc string 三重引号if条件域中 数字0,空list, tuple,dictionary为False,非零数字,非空list, tuple, dictionary为True布尔环境中,0、''、{}、[]、()、None为False,其他任何东西都为真bool and a or b类似C中... 阅读全文