sorted()也可以对字符串进行排序,字符串默认按照ASCII大小来比较
python 中 lambda 中标识这简单匿名函数:比如
计算 x*y
def chengji(x,y):
return x*y
不全等于 lambda x, y : x * y
异常出现原因是,文件中出现中文,但是没在文件头上加 # coding=utf-8
SyntaxError: Non-ASCII character '\xe4' in file index.py on line 9, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details