road = "RRLLRRRLLR"
start = 0

for i in range(len(road)):
    if road[i] == "R":
        start += 1
    elif road[i] == "L":
        start -= 1

print(start)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: