Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Follow Instructions by koladen
def follow(instructions):
y = [1 if i == 'f' else -1 for i in instructions if i in 'fb']
x = [1 if i == 'r' else -1 for i in instructions if i in 'rl']
return (sum(x), sum(y))
Nov. 5, 2020