摘要:
5. Data Structures This chapter describes some things you’ve learned about already in more detail, and adds some new things as well. 5.1. More on Lists The list data type has some more methods. Here a... 阅读全文
摘要:
4. More Control Flow Tools Besides the while statement just introduced, Python knows the usual control flow statements known from other languages, with some twists. 4.1. if Statements Perhaps the mo... 阅读全文
摘要:
lambda函数和and - or技巧的使用 当collapse为true时,返回" ".join(s.split()),而当collapse为false时,则返回s processFunc = collapse and (lambda s: " ".join(s.split())) or (lambda s: s)这个函数主要着重于简单的模糊处理和默认参数处理def ask_ok(prompt... 阅读全文