time complexity without for loop

前端 未结 0 1038
孤街浪徒
孤街浪徒 2020-12-09 12:27

code: x=[10,20,30,40,50]
y=20
if(y in x):
print(x.index(y))
else: print(-1)

Please help me with the below 2 Questions

  1. in the abov
相关标签:
回答
  • 消灭零回复
提交回复
热议问题