Python efficient way to check if very large string contains a substring

后端 未结 8 1848
無奈伤痛
無奈伤痛 2021-01-02 05:04

Python is not my best language, and so I\'m not all that good at finding the most efficient solutions to some of my problems. I have a very large string (coming from a 30 MB

8条回答
  •  南笙
    南笙 (楼主)
    2021-01-02 05:47

    How slow is too slow? I just did an a in b test for a unique string at the end of a 170 MB string. It finished before my finger left the Enter key.

提交回复
热议问题