<doocs>2211.Count Collisions on a Road_1.py
def countCollisions( directions: str) -> int:
    d = directions.lstrip('L').rstrip('R')
    return len(d) - d.count('S')
def sample_funcname ( var_0 : str ) -> int :
    var_7 = var_0.var_3 ( 'L' ).rstrip ( 'R' )
    return len ( var_7 ) - var_7.count ( 'S' )
