0
我与含纯数值数据列表的工作,我想一个列表中的数值差异方面的数据进行比较:鉴于这种根据数字差异比较列表的最有效方法?
primary_seq = [0, 2, 4, 5, 7, 8, 10]
...Code code code
primary_pattern = 2^2^1^2^1^2
sub_seq = [0, 2, 3, 5, 6]
...Code code code
sub_pattern = 2^1^2^1
,我想程序到sub_pattern与primary_pattern比较:
>>> primary_pattern >= sub_pattern
>>> True
所以,基本上,
221212 <--- Above seq.
2121 <--- This is a section of the above seq.
好点,我已经改变了一切代表名单,谢谢! – user2901512 2015-04-06 12:26:28
您是否有意使用模式和子模式按位异或?因为这是'''在Python中做的。 – Shashank 2015-04-06 12:31:34
为什么主要模式大于子模式? – 2015-04-06 12:34:26