07.05.2020 · python - 'dict_keys'오브젝트는 첨자화할 수 없습니다. 나는 random 를 배우고있다 이 예제와 함께 Python 3에서 함수를 사용하면 게시물 제목으로 오류가 발생합니다. 'dict_keys' object is not subscriptable . dictionary 에서 어디에서 잘못했는지 잘 모르겠습니다. . import random ...
30.09.2019 · In your code, you use data.keys () [0] which means: "Give me the first key of the dicitonary". But because the ordering is not guaranteed, asking for the "first" item does not really make sense. This is why in Python 3 it is no longer subscriptable. They prohibit it to prevent logical errors in the code.
02.09.2020 · “TypeError: 'dict_keys' object is not subscriptable” Code Answer TypeError: '_TypedDict' object is not subscriptable python by Envious Elk on Sep 02 2020 Comment
[Solved] TypeError: 'NoneType' object is not subscriptable how to resolve This typically means that you attempted to use functionality that needed an active HTTP request. Consult the documentation on testing for information about how to avoid this problem. in thread python
08.05.2013 · You can see this thread on the Python bug tracker from 2006 about random.choice not working for sets. It's algorithmically possible to make it work with the same asymptotic efficiency, but it would require either custom support from the set/dict data structures, or a new method in the interface. The python devs don't deem it needed.