上QQ阅读APP看书,第一时间看更新
Questions
- How do we retrieve one element from a list? How do we retrieve the last element of the list without computing its length explicitly?
- How do we get all elements of a list—except the first one and the last one—in the reverse order?
- How do we merge two dictionaries, and what happens if some of the keys are the same in both of them?
- What is the best data structure to check for membership?
- Can we get the last element of the generator without getting all the others?
- How do we combine elements from N triplets into three arrays of N one by one?
- What is the shortest way to generate a list of specific dictionary properties—which are retrieved from a list of dictionaries—if a certain other property of each dictionary is in the set?