Return a new sorted dict initailized from `iterable` and `value`. Items in the sorted dict have keys from `iterable` and values equal to `value`. Runtime complexity: `O(n*log(n))` :return: new sorted dict
(cls, iterable, value=None)
| 336 | |
| 337 | @classmethod |
| 338 | def fromkeys(cls, iterable, value=None): |
| 339 | """Return a new sorted dict initailized from `iterable` and `value`. |
| 340 | |
| 341 | Items in the sorted dict have keys from `iterable` and values equal to |
| 342 | `value`. |
| 343 | |
| 344 | Runtime complexity: `O(n*log(n))` |
| 345 | |
| 346 | :return: new sorted dict |
| 347 | |
| 348 | """ |
| 349 | return cls((key, value) for key in iterable) |
| 350 | |
| 351 | |
| 352 | def keys(self): |
no outgoing calls