Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import namedtuple
- Direction = namedtuple('Direction', 'Left Up Diagonal Stop')
- Direction.Stop = "stop"
- Direction.Left = "left"
- Direction.Up = "up"
- Direction.Diagonal = "diagonal"
- def get_directions(match, insert, delete, maximum):
- options = [(insert, Direction.Left), (match, Direction.Diagonal), (delete, Direction.Up)]
- return [d[1] for d in options if d[0] == maximum]
Add Comment
Please, Sign In to add comment