Python 3の辞書型をsorted()にかけるとキーしか残らないってそういうもんなんw
$ python3
Python 3.6.8 (default, Apr 24 2024, 21:55:04)
:
>>> sorted({1:'apple',2:'banana'})
[1, 2]
https://docs.python.org/3/whatsnew/3.0.html#common-stumbling-blocks
Python 3の辞書型をsorted()にかけるとキーしか残らないってそういうもんなんw
$ python3
Python 3.6.8 (default, Apr 24 2024, 21:55:04)
:
>>> sorted({1:'apple',2:'banana'})
[1, 2]
https://docs.python.org/3/whatsnew/3.0.html#common-stumbling-blocks
If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.zunda.ninja/users/zundan/statuses/116240848319762200 on your instance and quote it. (Note that quoting is not supported in Mastodon.)