Pythonでのin
オペレータの速度は、イテラブルの長さに比例していますか?
そう、
len(x) #10
if(a in x): #lets say this takes time A
pass
len(y) #10000
if(a in y): #lets say this takes time B
pass
A>Bですか?
Pythonでのin
オペレータの速度は、イテラブルの長さに比例していますか?
そう、
len(x) #10
if(a in x): #lets say this takes time A
pass
len(y) #10000
if(a in y): #lets say this takes time B
pass
A>Bですか?