dic = {
key: fr"{key}_value"
for key in
map(
chr, range(97, 100)
)
}
# print(
# dic.values()[2]
# ) # TypeError: 'dict_values' object is not subscriptable
print(
list(
dic.keys()
)[2]
)
TypeError: 'dict_values' object is not subscriptable
原创基督徒Isaac ©著作权
文章标签 TypeError: 'dict_val 文章分类 软件研发
上一篇: 读取后字典是否会自动排序?pd。readexcel
下一篇: 模块 对象 方法 备注 https://zhuanlan.zhihu.com/p/560029589 pkl python pickle.dump 内置 joblib.dump sciki
-
ES6的Object.fromEntries()和Object.hasOwn()
Object.fromEntries()方法是Object.entries()的逆操作,用于将一个键值对数组转为对象。
键值对 Object.hasOwn() Object.fromEntries -
TypeError: ‘function‘ object is not subscriptable
在tensorflow中使用零矩阵初始化变量的时候出现的:b = tf.Variable(tf.zeros[1])这是由于tf.zeros是一个函
Tensorflow tensorflow 初始化 计算机视觉