while 循环应用场景,没有具体的变量可以遍历,不知道具体的循环次数,知道终止的条件
cases = [
{"url":"http://..","method":"get"},
{"url":"http://..","method":"post"}
]
index = 0
while index<len(cases):
print(cases[index])
break
#自动索引 +1
index +=1
cases = [
{"url":"http://..","method":"get"},
{"url":"http://..","method":"post"}
]
index = 0
while index<len(cases):
print(cases[index])
break
#自动索引 +1
index +=1