Simple example of using the state machine in Python - the string before the ' x00'

zhaozj2021-02-16  89

>>> A'DFSF / X00DFDEF '>>> Class St: Def __init __ (self): self.st = true def -: self.st = false Return False Def S (Self): Return Self.st

>>> S = ST (); filter (Lambda x: (x! = '/ x00' and s.s ()) or (x == '/ x00' and s.t ()), a) 'DFSF'

ST is the state machine class, very imperfect, there is a relatively complete use state machine on the IBM-900 - the algorithm and programming methods in Python are very good.

转载请注明原文地址:https://www.9cbs.com/read-12193.html

New Post(0)