chapter 9
Across
- 4. `{key: value for (key, value) in iterable}`.
- 6. Returns a view object of all values in the dictionary.
- 8. `my_set.add(element)`, `my_set.remove(element)`.
- 9. Reads an object from a file.
- 11. Checks if set1 is a superset of set2.
- 16. Can include int, float, string, list, another dictionary, etc.
- 19. An immutable element used to reference a value in a dictionary.
- 20. Deletes a key-value pair from a dictionary.
- 21. Checks if a set is a superset of another.
- 23. The data associated with a specific key in a dictionary.
- 25. Returns elements present in one set but not the other.
- 27. Closes the file object.
- 28. Retrieves the value for a given key, optional default if key not found.
- 29. Returns the number of elements in the set.
- 30. Checks if set2 is a subset of set1.
- 32. Opens a file.
- 35. Returns common elements between sets.
- 36. Returns a view object of all keys in the dictionary.
- 37. Removes all elements from the dictionary.
- 38. Operator for union of two sets.
- 39. `{key: value for (key, value) in iterable if condition}`.
Down
- 1. for Creating a Set: `my_set = {1, 2, 3}` or `set()`.
- 2. :process of converting a Python object into a format that can be easily stored or transmitted, typically as a string or a byte stream.
- 3. `my_dict['key']`.
- 5. Checks if a set is a subset of another.
- 7. Combines elements from two sets.
- 8. `my_dict['new_key'] = 'new_value'`.
- 10. A collection of key-value pairs where each key is unique.
- 12. `my_dict = {'key': 'value'}`.
- 13. Removes a key and returns its value.
- 14. Returns a view object containing key-value pairs.
- 15. for Creating an Empty Dictionary: `my_dict = {}`.
- 17. Elements in either set but not in both.
- 18. Writes an object to a file (in the context of serializing).
- 22. An unordered collection of unique elements.
- 24. Checks if a key is in the dictionary.
- 26. Removes and returns a (key, value) pair.
- 31. in: Checks if a key is not in the dictionary.
- 33. not in and Sets: Checks for element presence or absence.
- 34. Returns the number of key-value pairs in the dictionary.
- 40. Comprehension: `{expression for item in iterable}`.