Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
str.count solution in Clear category for Follow Instructions by juestr
def follow(instructions):
x = y = 0
x += instructions.count('r')
x -= instructions.count('l')
y += instructions.count('f')
y -= instructions.count('b')
return x, y
Nov. 15, 2022
Comments: