添加 获取单层列表索引 关键字
This commit is contained in:
@@ -224,7 +224,14 @@ class Order:
|
||||
return "ture"
|
||||
else:
|
||||
return "flase"
|
||||
|
||||
# 获取单层列表索引
|
||||
def Index(self,list,value):
|
||||
n = 0
|
||||
for a in list:
|
||||
if a!=value:
|
||||
n+=1
|
||||
else:
|
||||
return n
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user