COMP9021--6.19

1. chr is to get the character, ord can get the order(unicode)
chr(11035)=chr(0x2B1B)='u2B1B' black square; 2B1A white square
int('2B1B',16)=11035

2. sorted will get the list in order, reverse=True 反向

3. sorted(['Anna', 'Ann', 'Paula'],key=str.lower),大写在小写前面

4. after add key, it is fine if only some of them are in capital letter
if we add key=ken, it will order by the length of each words

5. lambda x=lambda a: a + 2
x(3,5)    we can get 8

原文地址:https://www.cnblogs.com/eleni/p/11096317.html