Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Count chars in string solution in Clear category for Follow Instructions by Wartem
from typing import Tuple
def follow(instructions: str) -> Tuple[int, int]:
total = lambda x: instructions.count(x)
return(total("r") - total("l"), total("f") - total("b"))
Aug. 5, 2022
Comments: