gpt4 book ai didi

python - 获取 python 列表的所有索引

转载 作者:太空狗 更新时间:2023-10-29 19:32:56 26 4
gpt4 key购买 nike

<分区>

我可以通过以下方式获得第一个索引:

l = [1,2,3,1,1]
l.index(1) = 0

我如何获得所有索引的列表?

l.indexes(1) = [0,3,4]

?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com