‎Check network for missing images.

A collection of thoughts, study notes, and some fragments of life, presented in the form of a personal website.

科技 生活 世界 随手记两笔
Categories: 11
Posts: 169

Python 101 · Unpacking, Structural Matching, Packing

Feb 6, 2016

Unpacking var: positional, strictly based on position, 1-to-1 matching. _: placeholder, holds a places and ignores the value to satisfy syntax requirements, 1-to-1 matching. *foo: catch-all, catches the rest of the values...

Python 101 · Iterators, Generators, Comprehensions, Iterable, Hashable

Jan 30, 2016

Iterators An object that represents a stream of data. It fetches one element at a time using the __next__() method and maintains its internal state to know "what's next." range: generates a...

Python 101 · Membership, Logic, Walrus, Identity, Comparison Operators

Jan 23, 2016

Membership Checks if an element is in a container; in, not in. Logic Connects multiple Boolean conditions and evaluate the overall outcome; and, or, not. Logic Extended Performs 'bulk' logical checks, simplifying...

Python 101 · Conditions, Loops, Context Managers

Jan 16, 2016

Conditional Statements if-elif-else: logical branching. Truthy Falsy Values if obj:, while executing it, Python evaluates the following internal logic: bool(): Python first calls for this method; if it exists, its return value...

Python 101 · Shallow and Deep Copy

Jan 9, 2016

Mutable and Immutable Types Data Copy Behavior Immutable Data cannot be modified after creation, modifications create new objects Shallow and deep copy all refer to the original object; no copy needed, modifications...