Python: find a list within members of another list(in order)

前端 未结 9 2086
栀梦
栀梦 2020-12-03 10:40

If I have this:

a=\'abcdefghij\'
b=\'de\'

Then this finds b in a:

b in a => True

Is there a way of doi

9条回答
  •  离开以前
    2020-12-03 11:13

    Not sure how complex your application is, but for pattern matching in lists, pyparsing is very smart and easy to use.

提交回复
热议问题