Exactly three adjacent 3 in lists: Difference between revisions

→‎{{header|Python}}: Added condition – excluding short lists
(→‎{{header|Python}}: Added condition – excluding short lists)
Line 188:
else:
rest = [p(x) for x in xs[mbi:]]
return n <= len(rest) and all(rest[0:n]) and (
not any(rest[n:])
)
9,659

edits