how to check if a element on a list is the sum of the previous plus 1

前端 未结 0 1055
盖世英雄少女心
盖世英雄少女心 2020-12-07 03:00

so I need a function that receives a list and sees if the next element is the sum of the previous plus 1 like this [x, x+1, (x+1)+1] if so gives True

so an ex         


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