Tell us what’s happening:
Please explain why Test #3 should return “0”, but Test #1 can return “2”. In my code, and mental logic, my results for #3 should return “1”
Your code so far
def find_left_handed_seats(table):
availableSpots = 0
leftSide = table[0]
rightSide = table[1]
toLeft = ""
for l in leftSide:
print(l)
if l == "U":
if toLeft != "R":
print("added left")
availableSpots += 1
toLeft = "L"
continue
toLeft = l
toLeft = ""
for r in rightSide:
print(r)
if r == "U":
if toLeft != "R":
print("added right")
availableSpots += 1
toLeft = "L"
continue
toLeft = r
return availableSpots
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0
Challenge Information:
Daily Coding Challenge - Left-Handed Seat at the Table
https://www.freecodecamp.org/learn/daily-coding-challenge/2026-01-03