Why is Python's substring check so slow

后端 未结 0 898
猫巷女王i
猫巷女王i 2021-01-26 03:45

Check substring goes very slow

n = 100000
s1 = "x"*n + "y"*n + "x"*n
s2 = "xx"*n
print(s2 in s1)

It\'s on

相关标签:
回答
  • 消灭零回复
提交回复
热议问题