ikseek

Untitled

May 4th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def is_point_in_snake(point, snake):
  2.     point_belongs_to_snake = point == snake[0]
  3.     point_belongs_to_snake = point_belongs_to_snake or point == snake[1]
  4.     point_belongs_to_snake = point_belongs_to_snake or point == snake[2]
  5.     point_belongs_to_snake = point_belongs_to_snake or point == snake[3]
  6.     return point_belongs_to_snake
Advertisement
Add Comment
Please, Sign In to add comment