Dictionary Comprehensions
We'll cover the following...
We'll cover the following...
A dictionary comprehension is like a list comprehension, but it constructs a dictionary instead of a list.
① This is not a dictionary comprehension; it’s a list comprehension. It finds all .py files with test in their name, then constructs a tuple of the filename and the file metadata (from calling the os.stat() function).
② Each item of the resulting list is a tuple.
③ This is a dictionary comprehension. The syntax is similar to a list ...