购买主题
{:10_254:}
x = list(screen_times.keys())[ > 60 else -1 for g in list(screen_times.values())].index(1)]
不过只能找到第一个大于60的了
>>> x = [ i for i, j in screen_times.items() if j['购物'] > 60]
1
不会啊哈哈哈,学习了
z
本帖最后由 魔界风信子 于 2021-11-19 10:44 编辑
采用列表推导式:
x = for each in screen_times.items() if each["购物"] > 60]
11
x=['购物']>60]
1
x =
鹅鹅鹅
x =
11
先学习下
0
1
x = > 60]
x =
已有 25 人购买 本主题需向作者支付 5 鱼币 才能浏览