python_列表操作(查找)

查找

index() 

print(a.index("张三"))

输出结果:1

列表.index(对象,开始位置,结束位置)

print("张三",0,2)

输出结果: 1

 

count()   统计出现的次数

列表.count("对象")

print(a.count("张三"))

输出结果:  1

posted @ 2021-03-11 10:00  離落  阅读(123)  评论(0)    收藏  举报
{ "posted": "Dreamer-Paul", "version": "Live2DViewerEX Config 1.0", "model": "sagiri.moc", "textures": [ "textures/texture_00.png", "textures/texture_01.png" ], "layout": { "center_x": 0, "center_y": 0, "width": 2 }, "motions": { "tap": [ { "file": "motions/tap/c.mtn" } ], "idle": [ { "file": "motions/idle/idle_01.mtn" }, { "file": "motions/idle/idle_02.mtn" }, { "file": "motions/idle/idle_03.mtn" }, { "file": "motions/idle/idle_04.mtn" } ] }, "physics": "physics.json" }